The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I have two columns C1 and C2 in a GridGroupingcontrol. These columns have checkboxes in them.
When the user either checks or unchecks one of these checkboxes in either column I need to figure out which column the checkbox was in. (Also note that some of the checkboxes in both columns could be disabled and I don't care if the user keeps clicking on these or not.)
I have looked at these two events: private void gridGroupingControl1_TableControlCheckBoxClick(object sender, GridTableControlCellClickEventArgs e)
NRNirmal Raja Syncfusion Team February 24, 2011 04:45 AM UTC
Hi Dave,
Thank you for your interest in Syncfusion products.
The exact field of the corresping column can be retrieved through the FieldToColIndex method. The column index can be retrieved from the inner arguments of the event.
Please refer the code below: void gridGroupingControl1_TableControlCheckBoxClick(object sender, GridTableControlCellClickEventArgs e) { int fieldindex = gridGroupingControl1.TableModel.ColIndexToField(e.Inner.ColIndex); GridColumnDescriptor field = gridGroupingControl1.TableDescriptor.Columns[fieldindex]; MessageBox.Show(field.Name); }
Please let me know if you have any concern.
Regards, Nirmal
DMDavid MecteauxFebruary 24, 2011 01:20 PM UTC
Hi Nirmal,
Thanks for the reply. There are two problems with the code you provided.
1) If the user moves a column to a new location you will get the wrong column name back.
2) Also I need a way to ignore or detect when the user selects a checkbox cell that is disabled too.