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!

TableSettingsCollection Class

Represents the collection of custom table settings for a DataSetView.

Object
   BaseCollection
      TableSettingsCollection

[Visual Basic]
Public Class TableSettingsCollection
   Inherits BaseCollection
[C#]
public class TableSettingsCollection : BaseCollection
[C++]
public __gc class TableSettingsCollection : public BaseCollection
[JScript]
public class TableSettingsCollection extends BaseCollection

Remarks

The TableSettingsCollection is returned by the TableSettings property of the DataSetView.

Requirements

Namespace: System.Data

Assembly: System.Data.dll

Example [Visual Basic]

The following example creates a DataSetView and adds two TableSetting objects to the TableSettingsCollection.

[Visual Basic]

' The next two lines go into the Declarations section of the module:
' The next two lines go into the Declarations section of the module:
Private myDataSetView As DataSetView
' SuppliersProducts is a class derived from DataSet.
Private myDataSet As SuppliersProducts 

Private Sub CreateDataSetView()
   ' Not shown: SuppliersProducts is already configured with tables, relations, constraints.
   myDataSet = New SuppliersProducts
   myDataSetView = New DataSetView(myDataSet)
End Sub

Private Sub AddTableSettings()
   ' Create TableSetting and add it to TableSettingsCollection.
   Dim ts As TableSetting
   ts = MyDataSetView.TableSettings.Add(myDataSet.Tables("Suppliers"), _
   "CompanyName", "CompanyName < Z" & Combo1.Text, DataRowState.ModifiedCurrent)
   myDataSetView.TableSettings.Add ts

   ' Create and add second TableSetting.
   ts = MyDataSetView.TableSettings.Add(myDataSet.Tables("Products"), _
   "ProductName", "Discontinued = 'True'", DataRowState.CurrentRows)
   myDataSetView.TableSettings.Add ts
End Sub

See Also

TableSettingsCollection Members | System.Data Namespace