DataGridColumnCollection::Clear Method ()
.NET Framework (current version)
Removes all DataGridColumn-derived column objects from the DataGridColumnCollection collection.
Assembly: System.Web (in System.Web.dll)
Use this method to remove all DataGridColumn-derived column objects from the DataGridColumnCollection collection.
Note |
|---|
The Count property is automatically set to 0 after this method is used. |
The following code example demonstrates how to use the Clear method to empty the DataGridColumnCollection collection before adding new columns to the collection.
.NET Framework
Available since 1.1
Available since 1.1
Show:
