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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Expression not working as expected

Thread ID:





72524 Mar 25,2008 01:10 PM UTC Mar 25,2008 10:50 PM UTC WinForms 1
Tags: GridControl
Rohit Sharma
Asked On March 25, 2008 01:10 PM UTC


I have defined an expression like "[Deleted] Like \'Y\'" to set the row's backcolor equal to green.

For some reason the color green shows up only when the original record set contains Deleted column with value 'Y' but not when I programatically update the Deleted column value
record.SetValue("Delted", "Y");

Alternatively a deleted row shows up in green if i programatically add new row.

I am sure i am missing something but i have tried calling suspend/ResumeLayout, Refresh and Update but to no avail.

Can some one please give me some pointer on the same?

Administrator [Syncfusion]
Replied On March 25, 2008 10:50 PM UTC


Thank you for your patience.

If your intention is to highlight the record in green color, whose "deleted" column contains value "Y"(even though "Deleted column value change through coding), Please refer the code below.

this.gridGroupingControl1.TableOptions.SelectionBackColor = Color.Green;
void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
Element el = e.TableCellIdentity.DisplayElement;
if (el.Kind == DisplayElementKind.Record)
Record rec = el.GetRecord();
if (rec.GetValue("Deleted").Equals('Y'))

Please let me know if this helps.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon