//Template column of the datagrid //ItemDataBound for the datagrid private void dgSiteSummary_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e){ switch ( e.Item.ItemType ) { //when we are checking for values equal to '0' we have to check both Items and Alternating Items case ListItemType.Item: case ListItemType.AlternatingItem: if( double.Parse ( ((Label)(e.Item.FindControl("lblLabour"))).Text ) == 0 ) { //Getting the column based on the cell number. The same can be done using FindControl too e.Item.Cells[3].BackColor=Color.Lime; } }}