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!

DataRow.Table

Gets the DataTable for which this row has a schema.

[Visual Basic]
Public ReadOnly Property Table As DataTable
[C#]
public DataTable Table {get;}
[C++]
public: __property DataTable* get_Table();
[JScript]
public function get Table() : DataTable;

Property Value

The DataTable to which this row belongs.

Remarks

Note   The row does not necessarily belong to the table's collection of rows. This occurs when the DataRow has been created but not added to the RowsCollection. If the RowState property returns DataRowState.Proposed, the row is not in the collection.

Example [Visual Basic]

The following example uses the Table property to return a reference to the columns collection of the DataTable.

[Visual Basic]

Private Sub GetTable()
   Dim myRow As DataRow
   Dim tempTable as DataTable
   ' Use a DataGrid control's DataTable to create a new row.
   myRow = DataGrid1.DataSource.DataTable.NewRow
   ' Use the Table property to get the DataTable and then the columns.
   tempTable = myRow.Table

End Sub

See Also

DataRow Class | DataRow Members | System.Data Namespace | ColumnsCollection | DataTable