Fires when a cell is double-clicked.
Syntax
Event Data
The event handler receives an argument of type DoubleClickCellEventArgs containing data related to this event. The following DoubleClickCellEventArgs properties provide information specific to this event.
| Property | Description |
|---|
| Cell |
Returns the cell in the grid which was double clicked on.
|
Example
This snippet demonstrates how the DoubleClickCell event can be used to show a custom dialog box when the user double-clicks on a cell in a certain column. In this example, an order details dialog box is shown when the user double-clicks on a cell in the "OrderDetails" column.
For an overview of how to handle events in Visual Basic or Visual C#, see
Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see
Consuming Events in the
.NET Framework Developer's Guide.
| Visual Basic | Copy Code |
|---|
Private Sub ultraGrid1_DoubleClickCell(sender As Object, e As Infragistics.Win.UltraWinGrid.DoubleClickCellEventArgs) Handles Me.ultraGrid1.DoubleClickCell
' Check to see if the user double-clicked on a cell in the "OrderDetails" column.
'
If e.Cell.Column.Key = "OrderDetails" Then
' Create an instance of a custom dialog box which shows details about
' the order contained in the row of the cell that was clicked on.
'
Dim dlg As New OrderDetailsDialog()
dlg.OrderRow = e.Cell.Row
' Show the custom dialog box.
'
dlg.ShowDialog()
End If
End Sub |
| C# | Copy Code |
|---|
private void ultraGrid1_DoubleClickCell(object sender, Infragistics.Win.UltraWinGrid.DoubleClickCellEventArgs e)
{
// Check to see if the user double-clicked on a cell in the "OrderDetails" column.
//
if( e.Cell.Column.Key == "OrderDetails" )
{
// Create an instance of a custom dialog box which shows details about
// the order contained in the row of the cell that was clicked on.
//
OrderDetailsDialog dlg = new OrderDetailsDialog();
dlg.OrderRow = e.Cell.Row;
// Show the custom dialog box.
//
dlg.ShowDialog();
}
} |
Remarks
See Also