DataGridTableStyle Constructor (Boolean)

 
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.

This API supports the product infrastructure and is not intended to be used directly from your code.

Initializes a new instance of the DataGridTableStyle class using the specified value to determine whether the grid table is the default style.

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

public DataGridTableStyle(
	bool isDefaultTableStyle
)

Parameters

isDefaultTableStyle
Type: System.Boolean

true to specify the table as the default; otherwise, false.

The following code example creates a new DataGridTableStyle and adds it to the GridTableStylesCollection.

private void AddGridTable(){
   DataGridTableStyle myGridTableStyle;
   myGridTableStyle = new DataGridTableStyle();
   myGridTableStyle.MappingName = "Customers";
   dataGrid1.TableStyles.Add(myGridTableStyle);
}

.NET Framework
Available since 1.1
Return to top
Show: