Skip to main content
A newer version of this page is available. .

SpreadsheetNameBoxControl.ReadOnly Property

Gets or sets a value indicating whether the SpreadsheetNameBoxControl‘s value can be changed by end-users.

Namespace: DevExpress.XtraSpreadsheet

Assembly: DevExpress.XtraSpreadsheet.v21.2.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Spreadsheet

Declaration

[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Behavior")]
public DefaultBoolean ReadOnly { get; set; }

Property Value

Type Default Description
DefaultBoolean Default

A DefaultBoolean enumeration value specifying the accessibility of the SpreadsheetNameBoxControl control.

The default is DefaultBoolean.Default.

Available values:

Name Description
True

true. DefaultBoolean.True has a constant value of 0, while the standard true value corresponds to a value of 1. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

False

false. DefaultBoolean.False has a constant value of 1, while the standard false value corresponds to a value of 0. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

Default

The default behavior determined by the control’s logic.

Remarks

By default, the DefaultBoolean.Default value is treated as False for the SpreadsheetNameBoxControl, so that end-users can modify values of the name box. To prevent end-users from editing values in the SpreadsheetNameBoxControl, set the ReadOnly property to DefaultBoolean.True.

spreadsheetNameBoxControl1.ReadOnly = DevExpress.Utils.DefaultBoolean.True;

Note

Changing the ReadOnly property value raises the SpreadsheetNameBoxControl.ReadOnlyChanged event.

See Also