Export (0) Print
Expand All

DataGridViewCell.InheritedStyle Property

Note: This property is new in the .NET Framework version 2.0.

Gets the style currently applied to the cell.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public DataGridViewCellStyle InheritedStyle { get; }
/** @property */
public DataGridViewCellStyle get_InheritedStyle ()

public function get InheritedStyle () : DataGridViewCellStyle

Property Value

The DataGridViewCellStyle currently applied to the cell.

Exception typeCondition

InvalidOperationException

The cell does not belong to a DataGridView control.

-or-

ColumnIndex is less than 0, indicating that the cell is a row header cell.

ArgumentOutOfRangeException

The row containing the cell is a shared row.

-or-

The cell is a column header cell.

The DataGridView control displays its cells using the styles indicated by the cell InheritedStyle property, which inherits styles from other properties of type DataGridViewCellStyle. The styles specified through the Style property override the styles specified through all other cell-style properties, but do not necessarily indicate all the styles that contribute to the cell's appearance.

For more information, see Cell Styles in the Windows Forms DataGridView Control.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft