The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
DataColumnCollection.CollectionChanged Event
.NET Framework (current version)
Occurs when the columns collection changes, either by adding or removing a column.
Assembly: System.Data (in System.Data.dll)
The following example adds an event handler for the CollectionChanged event.
private void AddEventHandler(DataTable table) { DataColumnCollection columns = table.Columns; columns.CollectionChanged += new System.ComponentModel.CollectionChangeEventHandler( ColumnsCollection_Changed); } private void ColumnsCollection_Changed(object sender, System.ComponentModel.CollectionChangeEventArgs e) { DataColumnCollection columns = (DataColumnCollection) sender; Console.WriteLine("ColumnsCollectionChanged: " + columns.Count); }
.NET Framework
Available since 1.1
Available since 1.1
Show: