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. Image for the cookie policy date

Equivalent of NameToColIndex in Grid Grouping Control

Hi,
What is equivalent of NameToColIndex property in Grid Grouping Control.I have tried hard but not able to find in the forun as how to return column index from column name in GGC.I have databound heirchical GGC (Of two level 0-parent,1-child).

With Warm Regards,
Manish Bafna.

2 Replies

AD Administrator Syncfusion Team March 6, 2007 03:59 PM UTC

Hi Manish,

You can try this code.

int field = this.gridGroupingControl1.TableDescriptor.NameToField("Col1");
int colIndex = this.gridGroupingControl1.TableDescriptor.FieldToColIndex(field);

//For NestedTable...
int field = this.gridGroupingControl1.GetTableDescriptor("TableName").NameToField("Col1");
int colIndex = this.gridGroupingControl1.GetTableDescriptor("TableName").FieldToColIndex(field);

Best regards,
Haneef


MB Manish Bafna March 7, 2007 10:14 AM UTC

Thanks a lot.It is working.

With Warm Regards,
Manish Bafna

>Hi Manish,

You can try this code.

int field = this.gridGroupingControl1.TableDescriptor.NameToField("Col1");
int colIndex = this.gridGroupingControl1.TableDescriptor.FieldToColIndex(field);

//For NestedTable...
int field = this.gridGroupingControl1.GetTableDescriptor("TableName").NameToField("Col1");
int colIndex = this.gridGroupingControl1.GetTableDescriptor("TableName").FieldToColIndex(field);

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon