NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataGrid CurrentCellChange Event

Occurs when the selected cell changes.

The following declaration shows the syntax for a method that handles the CurrentCellChange event.

[Visual Basic]
Private Sub DataGridName_CurrentCellChange( _
   ByVal sender As Object, _
   ByVal e As EventArgs _
)
[C#]
private void DataGridName_CurrentCellChange(
   object sender,
   EventArgs e
);
[C++]
private: void DataGridName_CurrentCellChange(
   Object* sender,
   EventArgs* e
);
[JScript]
private DataGridName_CurrentCellChange(
   sender : Object,
   e : EventArgs
);

Parameters

sender
The source of the event.
e
An EventArgs that contains the event data. The following EventArgs properties provide information specific to this event.
Property Description
ExtendedInfo
Holds a reference to an object that manages the event's state.

Example [Visual Basic]

The following example prints the current row and column number using the CurrentCell property to return a DataGridCell.

[Visual Basic]

Private Sub DataGrid1_CurrentCellChange(ByVal sender As Object, ByVal e As System.EventArgs)
   Console.WriteLine(DataGrid1.CurrentCell.RowNumber)
   Console.WriteLine(DataGrid1.CurrentCell.ColumnNumber)
End Sub

See Also

DataGrid Class | DataGrid MembersTopic | System.WinForms Namespace | DataGrid.CurrentCell | DataGridCell