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:





92791 Feb 4,2010 09:29 AM UTC Feb 5,2010 10:40 AM UTC ASP.NET Web Forms (Classic) 2
Tags: GridGroupingControl
Arseny Khutoriansky
Asked On February 4, 2010 09:29 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.


Arseny Khutoriansky
Replied On February 4, 2010 10:22 AM UTC

Sorry, the post for WinForms

Ranjeet Kumar [Syncfusion]
Replied On February 5, 2010 10:40 AM UTC

Hi Arseniy,

Thanks for your interest in Syncfusion Products.

The sample attached contains a GridGroupingControl with three columns ID(int), FLAG(Boolean) and VAL(string) respectively. Column FLAG is of type CheckBox. To enable or disable VAL column's cell based on the checkbox state, I have handled QueryCellStyleInfo event as shown below in the code snippets.

To test the sample, run the sample and check or uncheck the checkbox and click on the corresponding cell of VAL Column.

// Event :

// Occurs for each cell before GridTableControl starts painting and lets users customize the display of cells.
this.gridGroupingControl1.QueryCellStyleInfo += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventHandler(gridGroupingControl1_QueryCellStyleInfo);

// Handler :

// To enable or disable VAL column cell
if (e.TableCellIdentity.ColIndex == 3)
// element displayed at the row of this cell
Element el = e.Style.TableCellIdentity.DisplayElement;
if (el != null && el.Kind == DisplayElementKind.Record)
// represents a record with data
Record r = el.GetRecord();
if (r == null)

string st = r.GetValue("FLAG").ToString();

if (st.Equals("False"))
e.Style.Enabled = false;

Please find the sample attached from link mentioned below :




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