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!

DataView.Table

Gets or sets the source DataTable.

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

Property Value

A DataTable that provides the data for this view.

Remarks

The DataTable also has a DefaultView property which returns the default DataView for the table. For example, if you wish to create a custom view on the table, set the RowFilter on the DataView returned by the DefaultView.

Example [Visual Basic]

The following example gets the DataTable of the current DataView.

[Visual Basic]

Private Sub GetDataTableFromDataView()
   ' Get the DataTable from the DataView bound to a DataGrid.
   Dim dv As DataView
   dv = CType(DataGrid1.DataSource, DataView)
   Dim t As DataTable
   t = dv.Table
   Dim r As DataRow
   Dim c As DataColumn
   For Each r in t.Rows
      For Each c in t.Columns
         Console.WriteLine(r(c)).ToString
      Next c
    Next r
ENd Sub

See Also

DataView Class | DataView Members | System.Data Namespace | DataTable