BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
[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