DataGridViewRow.InheritedStyle Property

 
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.

Gets the cell style in effect for the row.

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

public override DataGridViewCellStyle InheritedStyle { get; }

Property Value

Type: System.Windows.Forms.DataGridViewCellStyle

A DataGridViewCellStyle that specifies the formatting and style information for the cells in the row.

Exception Condition
InvalidOperationException

The row is in a DataGridView control and is a shared row.

This property is useful to determine which cell styles are applied to all cells in a row regardless of any column styles that are also applied to the cells. The row InheritedStyle property inherits its values from the following properties:

For more information about cell style inheritance, see Cell Styles in the Windows Forms DataGridView Control.

.NET Framework
Available since 2.0
Return to top
Show: