Backgroundcolor of rows

Hi! Is there a way to change the Background Color of a specific row in a GridDataBoundGrid? regards oliver

1 Reply

AD Administrator Syncfusion Team July 13, 2003 02:30 PM UTC

Handle the PrepareViewStyleInfo event and set the backcolor there if the e.RowIndex and e.ColIndex point to a cell in the row.
private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
        //color row 2
	if(e.ColIndex > 0 && e.RowIndex == 2)
	{
		e.Style.BackColor = Color.Red;
	}
}

Loader.
Up arrow icon