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

Occurs when a cell is clicked.

Syntax

Visual Basic (Declaration) 
Public Event ClickCell As ClickCellEventHandler
C# 
public event ClickCellEventHandler ClickCell

Event Data

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

PropertyDescription
Cell Returns the the cell the was clicked.

Example

The following snippet demonstrates displaying information about which cell was clicked.

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_ClickCell(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.ClickCellEventArgs)
	Dim msg As String = String.Format("Clicked on the cell at row index {0} and column index {1}", _
  		e.Cell.Row.Index, _
     e.Cell.Column.Index)

	MessageBox.Show(msg)
End Sub
C#Copy Code
private void ultraGrid1_ClickCell(object sender, Infragistics.Win.UltraWinGrid.ClickCellEventArgs e)
{
    string msg = String.Format("Clicked on the cell at row index {0} and column index {1}", 
        e.Cell.Row.Index, 
        e.Cell.Column.Index);

    MessageBox.Show(msg);
}

See Also