GridTableStylesCollection::CollectionChanged Event

 

Occurs when the collection has changed.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
event CollectionChangeEventHandler^ CollectionChanged {
	void add(CollectionChangeEventHandler^ value);
	void remove(CollectionChangeEventHandler^ value);
}

For more information about handling events, see Handling and Raising Events.

The following code example adds a CollectionChangeEventHandler delegate to a CollectionChanged event.

private:
   void AddHandler()
   {
      dataGrid1->TableStyles->CollectionChanged +=
         gcnew CollectionChangeEventHandler( this, &Form1::Collection_Changed );
   }

   void Collection_Changed( Object^ sender, CollectionChangeEventArgs^ e )
   {
      GridTableStylesCollection^ gts = (GridTableStylesCollection^)(sender);
      Console::WriteLine( gts->Count );
   }

.NET Framework
Available since 1.1
Return to top
Show: