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

GGC, cell enabling/disabling

Thread ID:





92796 Feb 4,2010 10:20 AM UTC Feb 9,2010 08:34 AM UTC WinForms 3
Tags: GridControl
Arseny Khutoriansky
Asked On February 4, 2010 10:20 AM UTC


I have table with 3 columns: ID(int), FLAG(bit) and VAL(string)
Column Flag is displayed as CheckBox automaticaly, because it is bit-type.

And I want that in each row cell of column VAL will be enabled, if the FLAG-cell is cheked(in this row) and
disabled, if the FLAG-cell is unchecked.

Please, give me some solution for this issue.


Jisha Joy [Syncfusion]
Replied On February 5, 2010 06:49 AM UTC

Hi Arseniy,

You could achieve the desired behavior by handling the QueryCellStyleInfo event. In this event you could set the styles of required cells based on the conditions.

void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
if (e.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell || e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell)
if (e.TableCellIdentity.Column != null && e.TableCellIdentity.Column.Name == "VAL")
Record r = e.TableCellIdentity.DisplayElement.GetRecord();
if (r != null)
if ((bool)r.GetValue("FLAG") == false)
e.Style.Enabled = false;




Please let me know if this helps.


Arseny Khutoriansky
Replied On February 9, 2010 06:33 AM UTC


Jisha Joy [Syncfusion]
Replied On February 9, 2010 08:34 AM UTC

Hi Arseniy,

Thank you for your update.



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

or the page will be automatically redirected to 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