ArcGIS Explorer Component Help |
TableBindingAdapter..::.Clear Method |
TableBindingAdapter Class Example See Also |
Removes all items from the TableBindingAdapter.
Namespace:
ESRI.ArcGISExplorer.DataAssembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public virtual void Clear() |
Visual Basic (Declaration) |
---|
Public Overridable Sub Clear |
Implements
IList..::.Clear()()()Examples
The code below creates a TableBindingAdapter object for a file geodatabase feature class, fills it
with all rows from the Table, uses the Clear method to empty the TableBindingAdapter then fills it again
with three rows from the Table.
CopyC#
{ //Open the mountains fill geodatabase feature class Table mountains = Table.OpenFileGeodatabaseTable(@"C:\Data\Scotland.gdb", "mountains"); //Create a new TableBindingAdapter object for the mountains Table TableBindingAdapter tableAdapter = new TableBindingAdapter(mountains); //Fill the adapter with all the rows tableAdapter.Fill(); System.Diagnostics.Debug.Print(tableAdapter.Count.ToString()); //Prints "562" //Clear the rows from the TableBindingAdapter tableAdapter.Clear(); System.Diagnostics.Debug.Print(tableAdapter.Count.ToString()); //Prints "0" //Fill the adapter with only the specified rows tableAdapter.Fill(new int[] { 1, 15, 232 }); System.Diagnostics.Debug.Print(tableAdapter.Count.ToString()); //Prints "3" }
CopyVB.NET
'Open the mountains fill geodatabase feature class Dim mountainsTable As Table = Table.OpenFileGeodatabaseTable("C:\Data\Scotland.gdb", "mountains") 'Create a new TableBindingAdapter object for the mountains Table Dim tableAdapter As TableBindingAdapter = New TableBindingAdapter(mountainsTable) 'Fill the adapter with all the rows tableAdapter.Fill() System.Diagnostics.Debug.Print(tableAdapter.Count.ToString()) 'Prints "562" 'Clear the rows from the TableBindingAdapter tableAdapter.Clear() System.Diagnostics.Debug.Print(tableAdapter.Count.ToString()) 'Prints "0" 'Fill the adapter with only the specified rows tableAdapter.Fill(New Integer() {1, 15, 232}) System.Diagnostics.Debug.Print(tableAdapter.Count.ToString()) 'Prints "3"