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!

DataGridCell.RowNumber

Gets or sets the number of a row in the DataGrid control.

[Visual Basic]
Public Property RowNumber As Integer
[C#]
public int RowNumber {get; set;}
[C++]
public: __property int get_RowNumber();
public: __property void set_RowNumber(int);
[JScript]
public function get RowNumber() : int;
public function set RowNumber(int);

Property Value

The number of the row.

Remarks

The RowNumber value can be used to specify a DataRow object in the DataTable associated with the DataGrid control.

Example [Visual Basic]

The following example assigns the CurrentCell property of a DataGrid to a DataGridCell and returns the value stored in the DataTable object's RowNumber and ColumnNumber properties.

[Visual Basic]

Private Sub PrintCell()
   Dim myCell As DataGridCell
   ' Set the variable to the selected cell.
   myCell = DataGrid1.CurrentCell
   ' Get the value of the selected cell through the DataTable.
   Dim t As DataTable
   t = DataGrid1.CurrentGridTable.DataTable
   Console.WriteLine(t.Rows(myCell.RowNumber)(myCell.ColumnNumber))
End Sub

See Also

DataGridCell Structure | DataGridCell Members | System.WinForms Namespace