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.

Highlighting a row in GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

52743 Dec 4,2006 02:17 AM Dec 4,2006 02:51 AM Windows Forms 1
loading
Tags: GridControl
Vinod Shembekar
Asked On December 4, 2006 02:17 AM

Hi,

The following statement works fine for numeric values. It matches rows perfectly.

gridConditionalFormatDescriptor1.Expression = "[amount]=100"

But when I have to compare string value it fails.
For e.g I have one column in grid called "item". And I have to highlight all records having value equal to "i1".

Will you please explain how following statement should be completed for "item" = "i1"?
gridConditionalFormatDescriptor1.Expression =


Thanks and Regards,
Vinod

Administrator [Syncfusion]
Replied On December 4, 2006 02:51 AM

Hi Vinod,

Please try the 'Like' operator to format the grid using GridConditionalFormatDescriptor. The following code sets the TextColor/BackColor of those record field cells whose Col1 values equal to 'W'’:

GridConditionalFormatDescriptor Descriptor1 = new GridConditionalFormatDescriptor();
Descriptor1.Appearance.AnyRecordFieldCell.TextColor = Color.Red;
Descriptor1.Appearance.AnyRecordFieldCell.BackColor = Color.AliceBlue;

Descriptor1.Expression = "[Col1] Like 'W'";

this.gridGroupingControl1.TableDescriptor.ConditionalFormats.Add(Descriptor1);

Please refer to the attached sample for implementation.
GGCConditionalFormatSample.zip

Best Regards,
Haneef

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.

;