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.
Unfortunately, activation email could not send to your email. Please try again.

how to get correct cell value from gridgroupcontrol?

Thread ID:





47479 Aug 4,2006 04:46 PM Aug 7,2006 01:15 AM Windows Forms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On August 4, 2006 04:46 PM


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 01:15 AM

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.

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.