Infragistics(R) NetAdvantage(R) Windows Forms
DoubleClickRow Event
See Also  Example E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace > UltraGrid Class : DoubleClickRow Event

Occurs when a row is double-clicked.

Syntax

Visual Basic (Declaration) 
Public Event DoubleClickRow As DoubleClickRowEventHandler
C# 
public event DoubleClickRowEventHandler DoubleClickRow

Event Data

The event handler receives an argument of type DoubleClickRowEventArgs containing data related to this event. The following DoubleClickRowEventArgs properties provide information specific to this event.

PropertyDescription
Row Returns the row in the grid which was double clicked on.
RowArea Returns the area of the row which was double clicked on.

Example

This sample demonstrates how to use the DoubleClickRow event to show a custom dialog box when the user double-clicks on a row selector.

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 BasicCopy Code
Private Sub ultraGrid1_DoubleClickRow(sender As Object, e As Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs) Handles Me.ultraGrid1.DoubleClickRow
   If e.Row.Band.Key = "customers" And e.RowArea = RowArea.RowSelectorArea Then
      Dim dlg As New CustomerInfoDialog(e.Row)
      dlg.ShowDialog()
   End If
End Sub
C#Copy Code
private void ultraGrid1_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
{
	if( e.Row.Band.Key == "customers" && e.RowArea == RowArea.RowSelectorArea )
	{
		CustomerInfoDialog dlg = new CustomerInfoDialog( e.Row );
		dlg.ShowDialog();
	}
}

Remarks

See Also