Gets the index of a specified System.Windows.Forms.DataGridColumnStyle.
- element
- The System.Windows.Forms.DataGridColumnStyle to find.
The zero-based index of the System.Windows.Forms.DataGridColumnStyle within the System.Windows.Forms.GridColumnStylesCollection or -1 if no corresponding System.Windows.Forms.DataGridColumnStyle exists.
Use the GridColumnStylesCollection.Contains(System.ComponentModel.PropertyDescriptor) method to determine if a specific System.Windows.Forms.DataGridColumnStyle exists. If so, and you need the index of the element within the collection, use the GridColumnStylesCollection.IndexOf(DataGridColumnStyle) method.