Use the AddingDataRow event, and set the color accordingly in the event handler.
e.g:
private void Form1_Load(object sender, EventArgs e)
{
gridControl1.AddingDataRow +=
new AddingDataRowEventHandler(gridControl1_AddingDataRow);
}
void gridControl1_AddingDataRow( object sender, AddingDataRowEventArgs e )
{
if( ( int )e.DataRow.Cells[ “ShipperID” ].Value == 2 )
e.DataRow.BackColor =
Color.Gray;
}
Imported from legacy forums. Posted by André (had 366 views)