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

How can I get CellValue

Thread ID:





58751 Mar 27,2007 07:11 PM UTC Mar 28,2007 04:00 AM UTC WinForms 1
Tags: Grouping
Hongbin Zhang
Asked On March 27, 2007 07:11 PM UTC


I use GridTableControlCellClickEventHandler to listen a mouse click event on a GGC cell. I want to get a column index of a col name so I can use:

obj = this.groupingGridTrade.TableModel.Model[e.Inner.RowIndex, colIndex].CellValue;

How can I do it?


Jeba S [Syncfusion]
Replied On 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(e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, e.Inner.ColIndex).Text);

Kindly let us know if this helps.

Best Regards,


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