windowsforms-devexpress-dot-xtraverticalgrid-dot-baseoptionsview-a1c736f2.md
Gets or sets whether to paint read-only rows according to the ReadOnlyRow and ReadOnlyRecordValue appearance settings.
Namespace : DevExpress.XtraVerticalGrid
Assembly : DevExpress.XtraVerticalGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.VerticalGrid
[DefaultValue(DefaultBoolean.Default)]
[XtraSerializableProperty]
public virtual DefaultBoolean AllowReadOnlyRowAppearance { get; set; }
<DefaultValue(DefaultBoolean.Default)>
<XtraSerializableProperty>
Public Overridable Property AllowReadOnlyRowAppearance As DefaultBoolean
| Type | Default | Description |
|---|---|---|
| DefaultBoolean | Default |
True if read-only rows are painted according to the ReadOnlyRow and ReadOnlyRecordValue appearance settings; otherwise, Default or False.
|
Available values:
| Name | Description | Return Value |
|---|---|---|
| True |
The value is true.
|
0
| | False |
The value is false.
|
1
| | Default |
The value is specified by a global option or a higher-level object.
|
2
|
You can access this nested property as listed below:
| Object Type | Path to AllowReadOnlyRowAppearance |
|---|---|
| VGridControlBase |
.OptionsView .AllowReadOnlyRowAppearance
|
A row’s ReadOnly property allows you to make the row non-editable. To customize read-only row appearance settings, use the following properties:
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.
The code below shows how to customize the read-only row color and enable the appearance settings.
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;
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