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!

TablesCollection.CanRemove

Verifies if a given table can be removed from the collection.

[Visual Basic]
Public Function CanRemove( _
   ByVal table As DataTable _
) As Boolean
[C#]
public bool CanRemove(
   DataTable table
);
[C++]
public: bool CanRemove(
   DataTable* table
);
[JScript]
public function CanRemove(
   table : DataTable
) : Boolean;

Parameters

table
[To be supplied.]

Return Value

true if the table can be removed; otherwise, false.

Example [Visual Basic]

The following example uses the CanRemove to test whether each table can be removed from a DataSet. If so, the Remove method is called to remove the table.

[Visual Basic]

Private Sub RemoveTables()
   Dim t As DataTable
   Dim dSet As DataSet
   ' Presuming a DataGrid is displaying more than one table, get its DataSet.
   Set dSet = DataGrid1.DataGridTable.DataTable.DataSet
   For each t in dSet.Tables
     If dSet.CanRemove t Then dSet.Remove t
   Next
End If

See Also

TablesCollection Class | TablesCollection Members | System.Data Namespace | Item | IndexOf | Remove