Gets a value indicating whether the System.Windows.Forms.GridColumnStylesCollection contains the System.Windows.Forms.DataGridColumnStyle with the specified name.
- name
- The DataGridColumnStyle.MappingName of the desired System.Windows.Forms.DataGridColumnStyle.
true if the collection contains the System.Windows.Forms.DataGridColumnStyle; otherwise, false.
The caption of a System.Windows.Forms.DataGridColumnStyle is set with the DataGridColumnStyle.HeaderText property.
Use the GridColumnStylesCollection.Contains(System.ComponentModel.PropertyDescriptor) method to determine if a particular System.Windows.Forms.DataGridColumnStyle exists before invoking the GridColumnStylesCollection.Remove(DataGridColumnStyle) method to remove the item. If you need to know the index of a particular System.Windows.Forms.DataGridColumnStyle, use the GridColumnStylesCollection.IndexOf(DataGridColumnStyle) method.