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 to get correct cell value from gridgroupcontrol?

Thread ID:





47479 Aug 4,2006 08:46 PM UTC Aug 7,2006 05:15 AM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On August 4, 2006 08:46 PM UTC


I have a gridgroupcontrol with datatable as datasource.
I tried to get the cell value from col2 when I right click the row (from contextmenu).
I tried to directly get the data from datatable,but it does not work after the sorting. Then I tried to get the cell value based on the kep and then find the row the datatable. The problem is that I cannot find the method under groupctrol to get the corresponding cellvalue for the row i clicked (as I did in normal datagrid)?

Is there a (better) way to do it?



Administrator [Syncfusion]
Replied On August 7, 2006 05:15 AM UTC

Hi Chris,

Please try the code below in the TableControlCellClick event of the grid.

if(e.Inner.MouseEventArgs.Button == MouseButtons.Right)
GridCurrentCell cc = e.TableControl.CurrentCell;
Console.WriteLine("newValue: {0} oldvalue: {1}", cc.Renderer.ControlText, e.TableControl.Model[cc.RowIndex, cc.ColIndex].CellValue);
GridTableCellStyleInfo style = e.TableControl.Model[cc.RowIndex, cc.ColIndex] as GridTableCellStyleInfo;
if(style != null)
Console.WriteLine("columnName: {0}", style.TableCellIdentity.Column.Name);

Let us know if you have any other questions.


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

This page will automatically be redirected to the 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