Changing background of a particular cell of a grid
try this in your ItemDataBound event if you are using DataGrid
if ((e.Item.ItemType.ToString() != “Header”) && (e.Item.ItemType.ToString() != “Footer”) && (e.Item.ItemType.ToString() != “Pager”)){
e.Item.Cells[0].BackColor = System.Drawing.Color.Blue;
}
try this in your RowDataBound event if you are using GridView
if (e.Row.RowType.ToString() != “Header” && e.Row.RowType.ToString() != “Footer” && e.Row.RowType.ToString() != “Pager”){
e.Row.Cells[0].BackColor = System.Drawing.Color.Blue;
}
