rhino000 says:
I have a datagridview ..It has 9columns..In some the column value is zero.
Instead of zero we have to chnage the value zero to some other content ..
It is possibiile in Gridview Rowdatabound ,But is this possible in Datagridview in windows form
You can find it by CellFormatting event where you can check column name and its value accordig to taht you can formate the value by checking column name and its value.
Check below line of code for your reference and try to implement in your code as per your logic.
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
// Here Checking the column name and its value accordingly that you can format the cell value
if (dataGridView1.Columns[e.ColumnIndex].Name == "Status" && e.Value != null && e.Value.ToString() == "0")
{
e.Value = "Not completed";
}
}