We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

71313 Jan 25,2008 01:25 PM Jan 28,2008 04:21 AM ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
Raymond Sisneros
Asked On January 25, 2008 01:25 PM

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



Vishnu Kumar [Syncfusion]
Replied On January 28, 2008 04:21 AM

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.



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;