System.Windows.Forms.DataGridTableStyle.GridColumnStyles Property

Gets the collection of columns drawn for this table.

Syntax

[System.ComponentModel.Localizable(true)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
public virtual GridColumnStylesCollection GridColumnStyles { get; }

Value

Documentation for this section has not yet been entered.

Remarks

The System.Windows.Forms.GridColumnStylesCollection returned by the DataGridTableStyle.GridColumnStyles property allows you to create a customized set of column styles. For each System.Data.DataColumn in a System.Data.DataTable, set the DataGridTableStyle.MappingName of a System.Windows.Forms.DataGridColumnStyle to the System.Data.DataColumn.ColumnName. That column style will automatically be used when this System.Windows.Forms.DataGridTableStyle is displayed.

If you create a System.Windows.Forms.DataGridTableStyle without adding any System.Windows.Forms.DataGridColumnStyle objects to the System.Windows.Forms.GridColumnStylesCollection, a collection of System.Windows.Forms.DataGridColumnStyle objects will be created automatically when a System.Windows.Forms.DataGridTableStyle with a valid DataGridTableStyle.MappingName is added to the System.Windows.Forms.GridTableStylesCollection. An exception will be thrown if you attempt to add System.Windows.Forms.DataGridColumnStyle objects with duplicate DataGridColumnStyle.MappingName values to the collection.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0