| StyleReadOnly Property |
Gets or sets the cell's read-only state.
Namespace: Stingray.GridAssembly: Stingray.GridControl (in Stingray.GridControl.dll) Version: 14.0.0.0
Syntax [DefaultValueAttribute(false)]
public bool ReadOnly { get; set; }
<DefaultValueAttribute(false)>
Public Property ReadOnly As Boolean
Get
Set
public:
[DefaultValueAttribute(false)]
property bool ReadOnly {
bool get ();
void set (bool value);
}
Property Value
Type:
Booleantrue if the cell is read-only and
false otherwise.
Remarks
After a cell is set read-only, no changes can be made to the cell.
Any subsequent calls to
SetStyleRange(Range, Style) or
SetValueRange(Range, String, ModifyType, Int32, RedrawFlags) are ignored
and return
false to indicate that the operation failed.
Although an edit cell cannot be changed when you set
it to read-only, the user can still activate the cell and make the flashing
caret become visible. If you want the cell to stay static even if the
user clicks into the edit cell, change the cell type to static
by setting Control to Label.
See Also