JS
Jeba S
Syncfusion Team
March 28, 2007 04:00 AM UTC
Hi HB,
You can get the column index of a column name using the TableDescriptor.NameToField.
private void gridGroupingControl1_TableControlCellClick(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCellClickEventArgs e)
{
string colName=e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, e.Inner.ColIndex).TableCellIdentity.Column.Name;
int colIndex=e.TableControl.TableDescriptor.NameToField(colName) ;
object s=e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, colIndex).CellValue;
Console.WriteLine("CellValue="+s);
Console.WriteLine(e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, e.Inner.ColIndex).Text);
}
Kindly let us know if this helps.
Best Regards,
Jeba.