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.GridTables

Gets the collection of tables for the grid.

[Visual Basic]
Public ReadOnly Property GridTables As GridTablesCollection
[C#]
public GridTablesCollection GridTables {get;}
[C++]
public: __property GridTablesCollection* get_GridTables();
[JScript]
public function get GridTables() : GridTablesCollection;

Property Value

A GridTablesCollection that represents the collection of DataGridTable objects.

Example [Visual Basic]

The following example returns the collection of DataGridTable objects, and prints the ColumnName for each DataGridColumn object for in the collection.

[Visual Basic]

Private Sub CountGridColumns()
   Dim dgt As DataGridTable
   Dim dgCol As DataGridColumn
   For Each dgt In DataGrid1.GridTables
      For Each dgCol in dgt.GridColumns
         Console.WriteLine(dgCol.DataColumn.ColumnName)
      Next
    Next
End Sub

See Also

DataGrid Class | DataGrid Members | System.WinForms Namespace | DataColumn | DataTable | DataGridTable | GridTablesCollection