changing back color of a row based on value in a particular column

Hi,

I am using GridGroupingControl and would like to backcolor a row based on a value in a particular column. For example, I would like to color the the row red if the value in the severity column is five and color the row yellow if the value of severity is four.


How i Can do this?

Regards
Ray



1 Reply

VK Vishnu Kumar Syncfusion Team January 28, 2008 09:21 AM UTC

Hi Ray,

Thank you for your patience.

backcolor a row based on a value in a particular column.

You can set the backcolor of a row based on a value in a particular column using the below code snippet:


[c#]

Color c1 = Color.FromName(colorProduct.SelectedItem.Text);
gcfd1.Appearance.AnyCell.BackColor = c1;



Please refer the sample in the below link which illustrates the above:

http://websamples.syncfusion.com/samples/Grid.Web/6.1.0.34/71313/main.htm

Please try running the above sample and let me know if this helps.

Regards,
Vishnu.



Loader.
Up arrow icon