DataGridViewRow::InheritedStyle Property
.NET Framework (current version)
Gets the cell style in effect for the row.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
public: property DataGridViewCellStyle^ InheritedStyle { virtual DataGridViewCellStyle^ get() override; }
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:
DataGridView::AlternatingRowsDefaultCellStyle (for rows with odd index number)
For more information about cell style inheritance, see Cell Styles in the Windows Forms DataGridView Control.
.NET Framework
Available since 2.0
Available since 2.0
Show: