Skip to main content
Tag

ColumnBase.ReadOnly Property

Gets or sets whether the column’s values cannot be changed by an end user. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v23.2.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

[DefaultValue(false)]
public bool ReadOnly { get; set; }

Property Value

Type Default Description
Boolean false

true to prevent an end-user from changing the column’s values; otherwise, false.

Remarks

If the column’s ReadOnly property is set to true, its cell values cannot be modified by end users. In this instance, cell editors can be invoked, but end users can only select and copy their values. However, setting this property to true doesn’t prevent cell values to be changed in code using the GridControl.SetCellValue method.

To learn more, see Data Editing and Validation.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ReadOnly property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also