GridTableStylesCollection.CollectionChanged Event

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Occurs when the collection has changed.

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

public event CollectionChangeEventHandler CollectionChanged

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 += 
   new CollectionChangeEventHandler(Collection_Changed);
}

private 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: