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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

OnCellDoubleClick

Thread ID:

Created:

Updated:

Platform:

Replies:

10177 Jan 24,2004 03:13 PM UTC Jan 24,2004 04:02 PM UTC WinForms 1
loading
Tags: Grouping
DC
Asked On January 24, 2004 03:13 PM UTC

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.

Administrator [Syncfusion]
Replied On 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

CONFIRMATION

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.

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

;