Back to Devexpress

VGridAppearanceCollection.ReadOnlyRow Property

windowsforms-devexpress-dot-xtraverticalgrid-dot-vgridappearancecollection-e36cc0c3.md

latest4.2 KB
Original Source

VGridAppearanceCollection.ReadOnlyRow Property

Provides access to appearance settings used to paint headers of read-only rows.

Namespace : DevExpress.XtraVerticalGrid

Assembly : DevExpress.XtraVerticalGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.VerticalGrid

Declaration

csharp
public AppearanceObject ReadOnlyRow { get; }
vb
Public ReadOnly Property ReadOnlyRow As AppearanceObject

Property Value

TypeDescription
AppearanceObject

An object that contains appearance settings.

|

Remarks

A row’s ReadOnly property allows you to make the row non-editable. To customize read-only row appearance settings, use the following properties:

  • ReadOnlyRow — specifies appearance settings applied to row headers.
  • ReadOnlyRecordValue — specifies appearance settings applied to cell values.

The default settings specify grayed-out appearance for read-only rows.

In the Vertical Grid, these appearance settings are only applied if the AllowReadOnlyRowAppearance option is enabled.

In the Property Grid’s Office view, the ReadOnlyRow settings are only in effect if the AllowRowHeaderReadOnlyAppearance option is enabled.

See the following topic for more information about appearance settings: Appearances.

Example

The code below shows how to customize the read-only row color and enable the appearance settings.

csharp
erID.Properties.ReadOnly = true;
vGridControl.Appearance.ReadOnlyRow.ForeColor = Color.DarkGray;
vGridControl.Appearance.ReadOnlyRow.Options.UseForeColor = true;
vGridControl.Appearance.ReadOnlyRecordValue.ForeColor = Color.DarkGray;
vGridControl.Appearance.ReadOnlyRecordValue.Options.UseForeColor = true;
vGridControl.OptionsView.AllowReadOnlyRowAppearance = DefaultBoolean.True;
vb
erID.Properties.ReadOnly = True
vGridControl.Appearance.ReadOnlyRow.ForeColor = Color.DarkGray
vGridControl.Appearance.ReadOnlyRow.Options.UseForeColor = True
vGridControl.Appearance.ReadOnlyRecordValue.ForeColor = Color.DarkGray
vGridControl.Appearance.ReadOnlyRecordValue.Options.UseForeColor = True
vGridControl.OptionsView.AllowReadOnlyRowAppearance = DefaultBoolean.True

See Also

AllowReadOnlyRowAppearance

ReadOnlyRecordValue

ReadOnly

Appearances

AllowRowHeaderReadOnlyAppearance

VGridAppearanceCollection Class

VGridAppearanceCollection Members

DevExpress.XtraVerticalGrid Namespace