ggc as listview and getting record thru dbl-click event

When a user double clicked an item in the ggc that behaves as a list view, I would like to get a ref to the underlying record in the dataset that it is bound to.

Which event of the ggc should i hook into?

1 Reply

AD Administrator Syncfusion Team November 10, 2006 04:20 AM UTC

Hi James,

You can handle the TableControl.CellDoubleClick event and get the current record using Table.CurrentRecord. Below is a code snippet

this.grid.TableControl.CellDoubleClick +=new GridCellClickEventHandler(TableControl_CellDoubleClick);

private void TableControl_CellDoubleClick(object sender, GridCellClickEventArgs e)
{
GridTableControl tc = sender as GridTableControl;
Console.WriteLine(tc.Table.CurrentRecord);
}

Best Regards,
Haneef

Loader.
Up arrow icon