ComponentOne True DBGrid Pro 8
Locked Property

This property returns or sets a value indicating whether an object can be edited.

Syntax

object.Locked= boolean

Remarks

Read/Write at run time and design time.

If True, the user cannot modify data in the column or split.

If False (the default), the user can modify data in the column or split.

If the TDBGrid control's AllowUpdate property is set to False, then editing is disabled for the entire grid regardless of the Locked property setting for individual columns and splits. If AllowUpdate is True, then the Locked property can be used to control the editability of individual columns and splits.

For Split objects, setting the Locked property to True disables editing for all columns within that split regardless of their Locked property setting. If Locked is False for a split, then the Locked settings of individual columns within that split are respected.

For Style objects, the Locked property controls the editability of the object to which the style is applied. It does not control the editability of the style object itself.

The locked state of a column or split is determined by its Style property setting. For these objects, the Locked property is a shortcut to the Locked member of the Style property.

For Style objects, the value of the Locked property is inherited from the parent style (if any) unless explicitly overridden.

Note

The default value of the Locked property for a column is not derived from the DataUpdatable property for the underlying field. If both properties are False for a column, then an error will occur when the grid attempts to write changed data to the database.

See Also

Column Object

Split Object

Style Object

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback