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)
return;
string st = r.GetValue("FLAG").ToString();
if (st.Equals("False"))
{
e.Style.Enabled = false;
}
}
}
Please find the sample attached from link mentioned below :
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=F92791-1051601063.zipRegards,
Ranjeet.