DataGridTableStyle DataGridTableStyle DataGridTableStyle DataGridTableStyle Class


Represents the table drawn by the DataGrid control at run time.

public ref class DataGridTableStyle : System::ComponentModel::Component, System::Windows::Forms::IDataGridEditingService
public class DataGridTableStyle : System.ComponentModel.Component, System.Windows.Forms.IDataGridEditingService
type DataGridTableStyle = class
    inherit Component
    interface IDataGridEditingService
Public Class DataGridTableStyle
Inherits Component
Implements IDataGridEditingService


The following code example creates two DataGridTableStyle instances and sets the MappingName of each object to the TableName of a DataTable in a DataSet. The example then adds DataGridColumnStyle objects to the GridColumnStylesCollection of each DataGridTableStyle. For an example that runs, see the System.Windows.Forms.DataGrid example.

void AddCustomDataTableStyle()
   /* Create a new DataGridTableStyle and set
         its MappingName to the TableName of a DataTable. */
   DataGridTableStyle^ ts1 = gcnew DataGridTableStyle;
   ts1->MappingName = "Customers";
   /* Add a GridColumnStyle and set its MappingName 
         to the name of a DataColumn in the DataTable. 
         Set the HeaderText and Width properties. */
   DataGridColumnStyle^ boolCol = gcnew DataGridBoolColumn;
   boolCol->MappingName = "Current";
   boolCol->HeaderText = "IsCurrent Customer";
   boolCol->Width = 150;
   ts1->GridColumnStyles->Add( boolCol );
   // Add a second column style.
   DataGridColumnStyle^ TextCol = gcnew DataGridTextBoxColumn;
   TextCol->MappingName = "custName";
   TextCol->HeaderText = "Customer Name";
   TextCol->Width = 250;
   ts1->GridColumnStyles->Add( TextCol );
   // Create the second table style with columns.
   DataGridTableStyle^ ts2 = gcnew DataGridTableStyle;
   ts2->MappingName = "Orders";
   // Change the colors.
   ts2->ForeColor = Color::Yellow;
   ts2->AlternatingBackColor = Color::Blue;
   ts2->BackColor = Color::Blue;
   // Create new DataGridColumnStyle objects.
   DataGridColumnStyle^ cOrderDate = gcnew DataGridTextBoxColumn;
   cOrderDate->MappingName = "OrderDate";
   cOrderDate->HeaderText = "Order Date";
   cOrderDate->Width = 100;
   ts2->GridColumnStyles->Add( cOrderDate );
   PropertyDescriptorCollection^ pcol = this->BindingContext[ myDataSet,"Customers.custToOrders" ]->GetItemProperties();
   DataGridColumnStyle^ csOrderAmount = gcnew DataGridTextBoxColumn( pcol[ "OrderAmount" ],"c",true );
   csOrderAmount->MappingName = "OrderAmount";
   csOrderAmount->HeaderText = "Total";
   csOrderAmount->Width = 100;
   ts2->GridColumnStyles->Add( csOrderAmount );
   // Add the DataGridTableStyle objects to the collection.
   myDataGrid->TableStyles->Add( ts1 );
   myDataGrid->TableStyles->Add( ts2 );

private void AddCustomDataTableStyle()
      /* Create a new DataGridTableStyle and set
      its MappingName to the TableName of a DataTable. */
      DataGridTableStyle ts1 = new DataGridTableStyle();
      ts1.MappingName = "Customers";

      /* Add a GridColumnStyle and set its MappingName 
      to the name of a DataColumn in the DataTable. 
      Set the HeaderText and Width properties. */
      DataGridColumnStyle boolCol = new DataGridBoolColumn();
      boolCol.MappingName = "Current";
      boolCol.HeaderText = "IsCurrent Customer";
      boolCol.Width = 150;
      // Add a second column style.
      DataGridColumnStyle TextCol = new DataGridTextBoxColumn();
      TextCol.MappingName = "custName";
      TextCol.HeaderText = "Customer Name";
      TextCol.Width = 250;

      // Create the second table style with columns.
      DataGridTableStyle ts2 = new DataGridTableStyle();
      ts2.MappingName = "Orders";
      // Change the colors.
      ts2.ForeColor = Color.Yellow;
      ts2.AlternatingBackColor = Color.Blue;
      ts2.BackColor = Color.Blue;
      // Create new DataGridColumnStyle objects.
      DataGridColumnStyle cOrderDate = 
      new DataGridTextBoxColumn();
      cOrderDate.MappingName = "OrderDate";
      cOrderDate.HeaderText = "Order Date";
      cOrderDate.Width = 100;

      PropertyDescriptorCollection pcol = this.BindingContext
      [myDataSet, "Customers.custToOrders"].GetItemProperties();
      DataGridColumnStyle csOrderAmount = 
      new DataGridTextBoxColumn(pcol["OrderAmount"], "c", true);
      csOrderAmount.MappingName = "OrderAmount";
      csOrderAmount.HeaderText = "Total";
      csOrderAmount.Width = 100;

      // Add the DataGridTableStyle objects to the collection.

Private Sub AddCustomDataTableStyle()
    ' Create a new DataGridTableStyle and set
    ' its MappingName to the TableName of a DataTable. 
    Dim ts1 As New DataGridTableStyle()
    ts1.MappingName = "Customers"
    ' Add a GridColumnStyle and set its MappingName
    ' to the name of a DataColumn in the DataTable.
    ' Set the HeaderText and Width properties. 
    Dim boolCol As New DataGridBoolColumn()
    boolCol.MappingName = "Current"
    boolCol.HeaderText = "IsCurrent Customer"
    boolCol.Width = 150
    ' Add a second column style.
    Dim TextCol As New DataGridTextBoxColumn()
    TextCol.MappingName = "custName"
    TextCol.HeaderText = "Customer Name"
    TextCol.Width = 250

    ' Create the second table style with columns.
    Dim ts2 As New DataGridTableStyle()
    ts2.MappingName = "Orders"

    ' Change the colors.
    ts2.ForeColor = Color.Yellow
    ts2.AlternatingBackColor = Color.Blue
    ts2.BackColor = Color.Blue
    ' Create new DataGridColumnStyle objects.
    Dim cOrderDate As New DataGridTextBoxColumn()
    cOrderDate.MappingName = "OrderDate"
    cOrderDate.HeaderText = "Order Date"
    cOrderDate.Width = 100
    Dim pcol As PropertyDescriptorCollection = Me.BindingContext(myDataSet, "Customers.custToOrders").GetItemProperties()
    Dim csOrderAmount As New DataGridTextBoxColumn(pcol("OrderAmount"), "c", True)
    csOrderAmount.MappingName = "OrderAmount"
    csOrderAmount.HeaderText = "Total"
    csOrderAmount.Width = 100

    ' Add the DataGridTableStyle objects to the collection.
End Sub 'AddCustomDataTableStyle


The System.Windows.Forms.DataGrid control displays data in the form of a grid. The DataGridTableStyle is a class that represents the drawn grid only. This grid should not be confused with the DataTable class, which is a possible source of data for the grid. Instead, the DataGridTableStyle strictly represents the grid as it is painted in the control. Therefore, through the DataGridTableStyle you can control the appearance of the grid for each DataTable. To specify which DataGridTableStyle is used when displaying data from a particular DataTable, set the MappingName to the TableName of a DataTable.

The GridTableStylesCollection retrieved through the TableStyles property contains all the DataGridTableStyle objects used by a System.Windows.Forms.DataGrid control. The collection can contain as many DataGridTableStyle objects as you need, however the MappingName of each must be unique. At run time, this allows you to substitute a different DataGridTableStyle for the same data, depending on the user's preference. To do this:

  1. Populate the GridTableStylesCollection with DataGridTableStyle objects. If a DataGridTableStyle exists in the GridTableStylesCollection whose MappingName property value equals the DataTable object's TableName property, the DataTable is displayed with this DataGridTableStyle. If no DataGridTableStyle exists with a matching MappingName, the DataTable is displayed with the default style for data grid tables.

  2. When a different grid style is needed, use the Item property to select the appropriate DataGridTableStyle (pass the TableName to the Item[String] property) and set the MappingName of the returned object to a new value.

  3. Use the Item[String] property to select the desired DataGridTableStyle, and set its MappingName to the TableName of the DataTable.


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

To determine which DataGridTableStyle is currently displayed, use the DataSource and DataMember properties of the System.Windows.Forms.DataGrid to return a CurrencyManager. If the data source implements the ITypedList interface, you can use the GetListName method to return the MappingName of the current table. This is shown in the C# code below:

private void PrintCurrentListName(DataGrid myDataGrid){  
 CurrencyManager myCM = (CurrencyManager)  
 BindingContext[myDataGrid.DataSource, myDataGrid.DataMember];  
 IList myList = myCM.List;  
 ITypedList thisList = (ITypedList) myList;  

If the DataSet contains DataTable objects related through DataRelation objects, and the currently displayed DataTable is a child table, the DataMember will return a string in the form of TableName.RelationName (in the simplest case). If the DataTable is further down in the hierarchy, the string will consist of the parent table's name followed by the necessary RelationName values required to reach the table's level. For example, imagine three DataTable objects in a hierarchical relationship named (top to bottom) Regions, Customers, and Orders, and two DataRelation objects named RegionsToCustomers and CustomersToOrders, the DataMember property will return "Regions.RegionsToCustomers.CustomersToOrders". However, the MappingName will then be "Orders".

The collection of DataGridTableStyle objects is returned through the TableStyles property of the System.Windows.Forms.DataGrid.

When a DataGridTableStyle is displayed, the settings for the DataGridTableStyle will override the settings for the System.Windows.Forms.DataGrid control. If a value is not set for a particular DataGridTableStyle property, the System.Windows.Forms.DataGrid control's value will be used instead. The following list shows the DataGridColumnStyle properties that can be set to override System.Windows.Forms.DataGrid control properties:

To bind the DataGrid to a strongly typed array of objects, the object type must contain public properties. To create a DataGridTableStyle that displays the array, set the DataGridTableStyle.MappingName property to typename where typename is replaced by the name of the object type. Also note that the MappingName property is case-sensitive; the type name must be matched exactly. See the MappingName property for an example.

You can also bind the DataGrid to an ArrayList. A feature of the ArrayList is that it can contain objects of multiple types, but the DataGrid can only bind to such a list when all items in the list are of the same type as the first item. This means that all objects must either be of the same type, or they must inherit from the same class as the first item in the list. For example, if the first item in a list is a Control, the second item could be a TextBox (which inherits from Control). If, on the other hand, the first item is a TextBox, the second object cannot be a Control. Further, the ArrayList must have items in it when it is bound and the objects in the DataGridTableStyle must contain public properties. An empty ArrayList will result in an empty grid. When binding to an ArrayList, set the MappingName of the DataGridTableStyle to "ArrayList" (the type name).


DataGridTableStyle() DataGridTableStyle() DataGridTableStyle() DataGridTableStyle()

Initializes a new instance of the DataGridTableStyle class.

DataGridTableStyle(Boolean) DataGridTableStyle(Boolean) DataGridTableStyle(Boolean) DataGridTableStyle(Boolean)

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

DataGridTableStyle(CurrencyManager) DataGridTableStyle(CurrencyManager) DataGridTableStyle(CurrencyManager) DataGridTableStyle(CurrencyManager)

Initializes a new instance of the DataGridTableStyle class with the specified CurrencyManager.


DefaultTableStyle DefaultTableStyle DefaultTableStyle DefaultTableStyle

Gets the default table style.


AllowSorting AllowSorting AllowSorting AllowSorting

Indicates whether sorting is allowed on the grid table when this DataGridTableStyle is used.

AlternatingBackColor AlternatingBackColor AlternatingBackColor AlternatingBackColor

Gets or sets the background color of odd-numbered rows of the grid.

BackColor BackColor BackColor BackColor

Gets or sets the background color of even-numbered rows of the grid.

CanRaiseEvents CanRaiseEvents CanRaiseEvents CanRaiseEvents

Gets a value indicating whether the component can raise an event.

(Inherited from Component)
ColumnHeadersVisible ColumnHeadersVisible ColumnHeadersVisible ColumnHeadersVisible

Gets or sets a value indicating whether column headers are visible.

Container Container Container Container

Gets the IContainer that contains the Component.

(Inherited from Component)
DataGrid DataGrid DataGrid DataGrid

Gets or sets the DataGrid control for the drawn table.

DesignMode DesignMode DesignMode DesignMode

Gets a value that indicates whether the Component is currently in design mode.

(Inherited from Component)
Events Events Events Events

Gets the list of event handlers that are attached to this Component.

(Inherited from Component)
ForeColor ForeColor ForeColor ForeColor

Gets or sets the foreground color of the grid table.

GridColumnStyles GridColumnStyles GridColumnStyles GridColumnStyles

Gets the collection of columns drawn for this table.

GridLineColor GridLineColor GridLineColor GridLineColor

Gets or sets the color of grid lines.

GridLineStyle GridLineStyle GridLineStyle GridLineStyle

Gets or sets the style of grid lines.

HeaderBackColor HeaderBackColor HeaderBackColor HeaderBackColor

Gets or sets the background color of headers.

HeaderFont HeaderFont HeaderFont HeaderFont

Gets or sets the font used for header captions.

HeaderForeColor HeaderForeColor HeaderForeColor HeaderForeColor

Gets or sets the foreground color of headers.

LinkColor LinkColor LinkColor LinkColor

Gets or sets the color of link text.

LinkHoverColor LinkHoverColor LinkHoverColor LinkHoverColor

Gets or sets the color displayed when hovering over link text.

MappingName MappingName MappingName MappingName

Gets or sets the name used to map this table to a specific data source.

PreferredColumnWidth PreferredColumnWidth PreferredColumnWidth PreferredColumnWidth

Gets or sets the width used to create columns when a new grid is displayed.

PreferredRowHeight PreferredRowHeight PreferredRowHeight PreferredRowHeight

Gets or sets the height used to create a row when a new grid is displayed.

ReadOnly ReadOnly ReadOnly ReadOnly

Gets or sets a value indicating whether columns can be edited.

RowHeadersVisible RowHeadersVisible RowHeadersVisible RowHeadersVisible

Gets or sets a value indicating whether row headers are visible.

RowHeaderWidth RowHeaderWidth RowHeaderWidth RowHeaderWidth

Gets or sets the width of row headers.

SelectionBackColor SelectionBackColor SelectionBackColor SelectionBackColor

Gets or sets the background color of selected cells.

SelectionForeColor SelectionForeColor SelectionForeColor SelectionForeColor

Gets or sets the foreground color of selected cells.

Site Site Site Site

Gets or sets the ISite of the Component.

(Inherited from Component)


BeginEdit(DataGridColumnStyle, Int32) BeginEdit(DataGridColumnStyle, Int32) BeginEdit(DataGridColumnStyle, Int32) BeginEdit(DataGridColumnStyle, Int32)

Requests an edit operation.

CreateGridColumn(PropertyDescriptor) CreateGridColumn(PropertyDescriptor) CreateGridColumn(PropertyDescriptor) CreateGridColumn(PropertyDescriptor)

Creates a DataGridColumnStyle, using the specified property descriptor.

CreateGridColumn(PropertyDescriptor, Boolean) CreateGridColumn(PropertyDescriptor, Boolean) CreateGridColumn(PropertyDescriptor, Boolean) CreateGridColumn(PropertyDescriptor, Boolean)

Creates a DataGridColumnStyle using the specified property descriptor. Specifies whether the DataGridColumnStyle is a default column style.

CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(Inherited from MarshalByRefObject)
Dispose() Dispose() Dispose() Dispose()

Releases all resources used by the Component.

(Inherited from Component)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Disposes of the resources (other than memory) used by the DataGridTableStyle.

EndEdit(DataGridColumnStyle, Int32, Boolean) EndEdit(DataGridColumnStyle, Int32, Boolean) EndEdit(DataGridColumnStyle, Int32, Boolean) EndEdit(DataGridColumnStyle, Int32, Boolean)

Requests an end to an edit operation.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetLifetimeService() GetLifetimeService() GetLifetimeService() GetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
GetService(Type) GetService(Type) GetService(Type) GetService(Type)

Returns an object that represents a service provided by the Component or by its Container.

(Inherited from Component)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.

(Inherited from MarshalByRefObject)
OnAllowSortingChanged(EventArgs) OnAllowSortingChanged(EventArgs) OnAllowSortingChanged(EventArgs) OnAllowSortingChanged(EventArgs)

Raises the AllowSortingChanged event.

OnAlternatingBackColorChanged(EventArgs) OnAlternatingBackColorChanged(EventArgs) OnAlternatingBackColorChanged(EventArgs) OnAlternatingBackColorChanged(EventArgs)

Raises the AlternatingBackColorChanged event.

OnBackColorChanged(EventArgs) OnBackColorChanged(EventArgs) OnBackColorChanged(EventArgs) OnBackColorChanged(EventArgs)

Raises the BackColorChanged event.

OnColumnHeadersVisibleChanged(EventArgs) OnColumnHeadersVisibleChanged(EventArgs) OnColumnHeadersVisibleChanged(EventArgs) OnColumnHeadersVisibleChanged(EventArgs)

Raises the ColumnHeadersVisibleChanged event.

OnForeColorChanged(EventArgs) OnForeColorChanged(EventArgs) OnForeColorChanged(EventArgs) OnForeColorChanged(EventArgs)

Raises the ForeColorChanged event.

OnGridLineColorChanged(EventArgs) OnGridLineColorChanged(EventArgs) OnGridLineColorChanged(EventArgs) OnGridLineColorChanged(EventArgs)

Raises the GridLineColorChanged event.

OnGridLineStyleChanged(EventArgs) OnGridLineStyleChanged(EventArgs) OnGridLineStyleChanged(EventArgs) OnGridLineStyleChanged(EventArgs)

Raises the GridLineStyleChanged event.

OnHeaderBackColorChanged(EventArgs) OnHeaderBackColorChanged(EventArgs) OnHeaderBackColorChanged(EventArgs) OnHeaderBackColorChanged(EventArgs)

Raises the HeaderBackColorChanged event.

OnHeaderFontChanged(EventArgs) OnHeaderFontChanged(EventArgs) OnHeaderFontChanged(EventArgs) OnHeaderFontChanged(EventArgs)

Raises the HeaderFontChanged event.

OnHeaderForeColorChanged(EventArgs) OnHeaderForeColorChanged(EventArgs) OnHeaderForeColorChanged(EventArgs) OnHeaderForeColorChanged(EventArgs)

Raises the HeaderForeColorChanged event.

OnLinkColorChanged(EventArgs) OnLinkColorChanged(EventArgs) OnLinkColorChanged(EventArgs) OnLinkColorChanged(EventArgs)

Raises the LinkColorChanged event.

OnLinkHoverColorChanged(EventArgs) OnLinkHoverColorChanged(EventArgs) OnLinkHoverColorChanged(EventArgs) OnLinkHoverColorChanged(EventArgs)

Raises the LinkHoverColorChanged event.

OnMappingNameChanged(EventArgs) OnMappingNameChanged(EventArgs) OnMappingNameChanged(EventArgs) OnMappingNameChanged(EventArgs)

Raises the MappingNameChanged event

OnPreferredColumnWidthChanged(EventArgs) OnPreferredColumnWidthChanged(EventArgs) OnPreferredColumnWidthChanged(EventArgs) OnPreferredColumnWidthChanged(EventArgs)

Raises the PreferredColumnWidthChanged event.

OnPreferredRowHeightChanged(EventArgs) OnPreferredRowHeightChanged(EventArgs) OnPreferredRowHeightChanged(EventArgs) OnPreferredRowHeightChanged(EventArgs)

Raises the PreferredRowHeightChanged event.

OnReadOnlyChanged(EventArgs) OnReadOnlyChanged(EventArgs) OnReadOnlyChanged(EventArgs) OnReadOnlyChanged(EventArgs)

Raises the ReadOnlyChanged event.

OnRowHeadersVisibleChanged(EventArgs) OnRowHeadersVisibleChanged(EventArgs) OnRowHeadersVisibleChanged(EventArgs) OnRowHeadersVisibleChanged(EventArgs)

Raises the RowHeadersVisibleChanged event.

OnRowHeaderWidthChanged(EventArgs) OnRowHeaderWidthChanged(EventArgs) OnRowHeaderWidthChanged(EventArgs) OnRowHeaderWidthChanged(EventArgs)

Raises the RowHeaderWidthChanged event.

OnSelectionBackColorChanged(EventArgs) OnSelectionBackColorChanged(EventArgs) OnSelectionBackColorChanged(EventArgs) OnSelectionBackColorChanged(EventArgs)

Raises the SelectionBackColorChanged event.

OnSelectionForeColorChanged(EventArgs) OnSelectionForeColorChanged(EventArgs) OnSelectionForeColorChanged(EventArgs) OnSelectionForeColorChanged(EventArgs)

Raises the SelectionForeColorChanged event.

ResetAlternatingBackColor() ResetAlternatingBackColor() ResetAlternatingBackColor() ResetAlternatingBackColor()

Resets the AlternatingBackColor property to its default value.

ResetBackColor() ResetBackColor() ResetBackColor() ResetBackColor()

Resets the BackColor property to its default value.

ResetForeColor() ResetForeColor() ResetForeColor() ResetForeColor()

Resets the ForeColor property to its default value.

ResetGridLineColor() ResetGridLineColor() ResetGridLineColor() ResetGridLineColor()

Resets the GridLineColor property to its default value.

ResetHeaderBackColor() ResetHeaderBackColor() ResetHeaderBackColor() ResetHeaderBackColor()

Resets the HeaderBackColor property to its default value.

ResetHeaderFont() ResetHeaderFont() ResetHeaderFont() ResetHeaderFont()

Resets the HeaderFont property to its default value.

ResetHeaderForeColor() ResetHeaderForeColor() ResetHeaderForeColor() ResetHeaderForeColor()

Resets the HeaderForeColor property to its default value.

ResetLinkColor() ResetLinkColor() ResetLinkColor() ResetLinkColor()

Resets the LinkColor property to its default value.

ResetLinkHoverColor() ResetLinkHoverColor() ResetLinkHoverColor() ResetLinkHoverColor()

Resets the LinkHoverColor property to its default value.

ResetSelectionBackColor() ResetSelectionBackColor() ResetSelectionBackColor() ResetSelectionBackColor()

Resets the SelectionBackColor property to its default value.

ResetSelectionForeColor() ResetSelectionForeColor() ResetSelectionForeColor() ResetSelectionForeColor()

Resets the SelectionForeColor property to its default value.

ShouldSerializeAlternatingBackColor() ShouldSerializeAlternatingBackColor() ShouldSerializeAlternatingBackColor() ShouldSerializeAlternatingBackColor()

Indicates whether the AlternatingBackColor property should be persisted.

ShouldSerializeBackColor() ShouldSerializeBackColor() ShouldSerializeBackColor() ShouldSerializeBackColor()

Indicates whether the BackColor property should be persisted.

ShouldSerializeForeColor() ShouldSerializeForeColor() ShouldSerializeForeColor() ShouldSerializeForeColor()

Indicates whether the ForeColor property should be persisted.

ShouldSerializeGridLineColor() ShouldSerializeGridLineColor() ShouldSerializeGridLineColor() ShouldSerializeGridLineColor()

Indicates whether the GridLineColor property should be persisted.

ShouldSerializeHeaderBackColor() ShouldSerializeHeaderBackColor() ShouldSerializeHeaderBackColor() ShouldSerializeHeaderBackColor()

Indicates whether the HeaderBackColor property should be persisted.

ShouldSerializeHeaderForeColor() ShouldSerializeHeaderForeColor() ShouldSerializeHeaderForeColor() ShouldSerializeHeaderForeColor()

Indicates whether the HeaderForeColor property should be persisted.

ShouldSerializeLinkColor() ShouldSerializeLinkColor() ShouldSerializeLinkColor() ShouldSerializeLinkColor()

Indicates whether the LinkColor property should be persisted.

ShouldSerializeLinkHoverColor() ShouldSerializeLinkHoverColor() ShouldSerializeLinkHoverColor() ShouldSerializeLinkHoverColor()

Indicates whether the LinkHoverColor property should be persisted.

ShouldSerializePreferredRowHeight() ShouldSerializePreferredRowHeight() ShouldSerializePreferredRowHeight() ShouldSerializePreferredRowHeight()

Indicates whether the PreferredRowHeight property should be persisted.

ShouldSerializeSelectionBackColor() ShouldSerializeSelectionBackColor() ShouldSerializeSelectionBackColor() ShouldSerializeSelectionBackColor()

Indicates whether the SelectionBackColor property should be persisted.

ShouldSerializeSelectionForeColor() ShouldSerializeSelectionForeColor() ShouldSerializeSelectionForeColor() ShouldSerializeSelectionForeColor()

Indicates whether the SelectionForeColor property should be persisted.

ToString() ToString() ToString() ToString()

Returns a String containing the name of the Component, if any. This method should not be overridden.

(Inherited from Component)


AllowSortingChanged AllowSortingChanged AllowSortingChanged AllowSortingChanged

Occurs when the AllowSorting property value changes.

AlternatingBackColorChanged AlternatingBackColorChanged AlternatingBackColorChanged AlternatingBackColorChanged

Occurs when the AlternatingBackColor value changes.

BackColorChanged BackColorChanged BackColorChanged BackColorChanged

Occurs when the BackColor value changes.

ColumnHeadersVisibleChanged ColumnHeadersVisibleChanged ColumnHeadersVisibleChanged ColumnHeadersVisibleChanged

Occurs when the ColumnHeadersVisible value changes.

Disposed Disposed Disposed Disposed

Occurs when the component is disposed by a call to the Dispose() method.

(Inherited from Component)
ForeColorChanged ForeColorChanged ForeColorChanged ForeColorChanged

Occurs when the ForeColor value changes.

GridLineColorChanged GridLineColorChanged GridLineColorChanged GridLineColorChanged

Occurs when the GridLineColor value changes.

GridLineStyleChanged GridLineStyleChanged GridLineStyleChanged GridLineStyleChanged

Occurs when the GridLineStyle value changes.

HeaderBackColorChanged HeaderBackColorChanged HeaderBackColorChanged HeaderBackColorChanged

Occurs when the HeaderBackColor value changes.

HeaderFontChanged HeaderFontChanged HeaderFontChanged HeaderFontChanged

Occurs when the HeaderFont value changes.

HeaderForeColorChanged HeaderForeColorChanged HeaderForeColorChanged HeaderForeColorChanged

Occurs when the HeaderForeColor value changes.

LinkColorChanged LinkColorChanged LinkColorChanged LinkColorChanged

Occurs when the LinkColor value changes.

LinkHoverColorChanged LinkHoverColorChanged LinkHoverColorChanged LinkHoverColorChanged

Occurs when the LinkHoverColor value changes.

MappingNameChanged MappingNameChanged MappingNameChanged MappingNameChanged

Occurs when the MappingName value changes.

PreferredColumnWidthChanged PreferredColumnWidthChanged PreferredColumnWidthChanged PreferredColumnWidthChanged

Occurs when the PreferredColumnWidth property value changes.

PreferredRowHeightChanged PreferredRowHeightChanged PreferredRowHeightChanged PreferredRowHeightChanged

Occurs when the PreferredRowHeight value changes.

ReadOnlyChanged ReadOnlyChanged ReadOnlyChanged ReadOnlyChanged

Occurs when the ReadOnly value changes.

RowHeadersVisibleChanged RowHeadersVisibleChanged RowHeadersVisibleChanged RowHeadersVisibleChanged

Occurs when the RowHeadersVisible value changes.

RowHeaderWidthChanged RowHeaderWidthChanged RowHeaderWidthChanged RowHeaderWidthChanged

Occurs when the RowHeaderWidth value changes.

SelectionBackColorChanged SelectionBackColorChanged SelectionBackColorChanged SelectionBackColorChanged

Occurs when the SelectionBackColor value changes.

SelectionForeColorChanged SelectionForeColorChanged SelectionForeColorChanged SelectionForeColorChanged

Occurs when the SelectionForeColor value changes.

Applies to

See also