Access cell values when using Group By functionality

I have a GridGrouping Control, I have hooked into the TableControlCurrentCellControlDoubleClick event to capture specific cell values when the user doublecclicks on a row.

this is how i get the id field value
int rowIndex = e.TableControl.CurrentCell.RowIndex;
string Id = e.TableControl.Table.TableModel[rowIndex, gridIdColumnIndex].CellValue.ToString();

This works under normal circumstances, however, when the rows are grouped by any of the columns in the grid, i cannot get the id value for a row when it's doubleclicked...the cellvalue is alway = empty string

2 Replies

CH Chinedu June 15, 2007 05:44 PM UTC

thanks again Haneef.

really appreciate your help.


HA haneefm Syncfusion Team June 15, 2007 06:02 PM UTC

Hi Nedu,

To get the id column value of a record, you can use the GetValue method of that record. Below is a code snippet.

[c#]
object objId = e.TableControl.Table.CurrentRecord.GetValue("IDColumnName");
string id = Convert.ToString(objId);

Best Regards,
Haneef

Loader.
Up arrow icon