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. Image for the cookie policy date
close icon

OnCellDoubleClick

How do I map to this event in the grouping grid? I need to get the rowindex for the cell that was double clicked in the grouping grid.

1 Reply

AD Administrator Syncfusion Team January 24, 2004 04:02 PM UTC

You can listen to the CellDoubleClick and CurrentCellControlDoubleClick of the underlying GridTableControl. Example: [C#] this.groupingGrid1.TableControl.CellDoubleClick += new GridCellClickEventHandler(TableControl_CellDoubleClick); this.groupingGrid1.TableControl.CurrentCellControlDoubleClick += new ControlEventHandler(TableControl_CurrentCellControlDoubleClick); private void TableControl_CellDoubleClick(object sender, GridCellClickEventArgs e) { GridTableControl tableControl = (GridTableControl) sender; GridTableCellStyleInfo style = tableControl.Table.GetTableCellStyle(e.RowIndex, e.ColIndex); GridTableCellStyleInfoIdentity id = style.TableCellIdentity; MessageBox.Show("DoubleClick on " + id.ToString()); } private void TableControl_CurrentCellControlDoubleClick(object sender, ControlEventArgs e) { GridTableControl tableControl = (GridTableControl) sender; GridCurrentCell gcc = tableControl.CurrentCell; GridTableCellStyleInfo style = tableControl.Table.GetTableCellStyle(gcc.RowIndex, gcc.ColIndex); GridTableCellStyleInfoIdentity id = style.TableCellIdentity; MessageBox.Show("DoubleClick on " + id.ToString()); } [VB] AddHandler Me.groupingGrid1.TableControl.CellDoubleClick, AddressOf TableControl_CellDoubleClick AddHandler Me.groupingGrid1.TableControl.CurrentCellControlDoubleClick, AddressOf TableControl_CurrentCellControlDoubleClick Private Sub TableControl_CellDoubleClick(sender As Object, e As GridCellClickEventArgs) Dim tableControl As GridTableControl = CType(sender, GridTableControl) Dim style As GridTableCellStyleInfo = tableControl.Table.GetTableCellStyle(e.RowIndex, e.ColIndex) Dim id As GridTableCellStyleInfoIdentity = style.TableCellIdentity MessageBox.Show("DoubleClick on " + id.ToString()) End Sub ''TableControl_CellDoubleClick Private Sub TableControl_CurrentCellControlDoubleClick(sender As Object, e As ControlEventArgs) Dim tableControl As GridTableControl = CType(sender, GridTableControl) Dim gcc As GridCurrentCell = tableControl.CurrentCell Dim style As GridTableCellStyleInfo = tableControl.Table.GetTableCellStyle(gcc.RowIndex, gcc.ColIndex) Dim id As GridTableCellStyleInfoIdentity = style.TableCellIdentity MessageBox.Show("DoubleClick on " + id.ToString()) End Sub ''TableControl_CurrentCellControlDoubleClick We will also provide current cell and cell events for the GridGroupingControl soon. Then you don''t have to access the underlying GridTableControl. This will make it easier especially when hierarchies are involved. (Above code is meant for a grouping grid with just one table). Stefan

Loader.
Live Chat Icon For mobile
Up arrow icon