Click or drag to resize
ParamLockReadOnly Property
Gets or sets the readonly state for cells in the grid.

Namespace: Stingray.Grid
Assembly: Stingray.GridControl (in Stingray.GridControl.dll) Version: 14.0.0.0
Syntax
[DefaultValueAttribute(true)]
public bool LockReadOnly { get; set; }

Property Value

Type: Boolean
The readonly state for cells in the grid.
Remarks
Call this method if you want to turn on or off the protection of read-only cells in the grid.

You can set the whole grid to read-only setting the property ReadOnly to true, and you can set specific cells with ReadOnly. When you have read-only cells in the grid, these cells are protected against any changes from the end user and from the programmer. After setting cells (or the grid), you cannot apply any changes programmatically to the cell, and the user cannot change the cells. Although this makes sense, it is often necessary for the programmer be able to change the cell contents of read-only cells. LockReadOnly enables the programmer to change read-only cells.

You can change read-only cells if you set LockReadOnly to false. This disables the read-only mode for all cells, and you can apply your changes. After changing the cells, you should set LockReadOnly to true (this is the default initial setting), which will reenable the protection for read-only cells.

See Also