GridColumnStylesCollection::CollectionChanged Event
.NET Framework (current version)
Occurs when a change is made to the GridColumnStylesCollection.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
For more information about handling events, see NIB: Consuming Events.
The following code example adds a handler for the CollectionChanged event.
private: void AddHandler() { GridColumnStylesCollection^ myGridColumns; myGridColumns = dataGrid1->TableStyles[ 0 ]->GridColumnStyles; // Add the handler. myGridColumns->CollectionChanged += gcnew CollectionChangeEventHandler( this, &Form1::GridCollection_Changed ); } void GridCollection_Changed( Object^ sender, CollectionChangeEventArgs^ /*e*/ ) { GridColumnStylesCollection^ myGridColumns; myGridColumns = dynamic_cast<GridColumnStylesCollection^>(sender); Console::WriteLine( myGridColumns->Count ); }
.NET Framework
Available since 1.1
Available since 1.1
Show: