System.Windows.Forms.DataGrid.TableStyles Property

Gets the collection of System.Windows.Forms.DataGridTableStyle objects for the grid.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
[System.ComponentModel.Localizable(true)]
public GridTableStylesCollection TableStyles { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the System.Windows.Forms.GridTableStylesCollection retrieved through the DataGrid.TableStyles property to create customized views of each table displayed by the System.Windows.Forms.DataGrid control.

By default, the collection returned by DataGrid.TableStyles property does not contain any System.Windows.Forms.DataGridTableStyle objects. To create a set of customized views:

[The 'ordered' type of list has not been implemented in the ECMA stylesheet.]
Note:

Always create System.Windows.Forms.DataGridColumnStyle objects and add them to the System.Windows.Forms.GridColumnStylesCollection before adding System.Windows.Forms.DataGridTableStyle objects to the System.Windows.Forms.GridTableStylesCollection. When you add an empty System.Windows.Forms.DataGridTableStyle with a valid DataGridTableStyle.MappingName value to the collection, System.Windows.Forms.DataGridColumnStyle objects are automatically generated for you. Consequently, an exception will be thrown if you try to add new System.Windows.Forms.DataGridColumnStyle objects with duplicate DataGridTableStyle.MappingName values to the System.Windows.Forms.GridColumnStylesCollection.

Requirements

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