Export (0) Print
Expand All
Expand Minimize

Visual Basic: DataGrid Control

Visual Studio 6.0

AllowUpdate Property

See Also   Example   Applies To

Returns or sets a value indicating whether a user can modify any data in the DataGrid control.


object.AllowUpdate [= value]

The AllowUpdate property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
value A Boolean expression that determines whether the user can change data, as described in Settings.


The settings for value are:

Setting Description
True The user can modify data in the DataGrid control
False The user can't modify data in the DataGrid control


When the AllowUpdate property is False, the user can still scroll through the DataGrid control and select data, but can't change any of the values; any attempt to change the data in the grid is ignored.

You can also use the Column object properties to make individual columns of the DataGrid control read-only, but the AllowUpdate property setting takes precedence over the column settings (without changing the column settings).

Note   The Recordset object may not enable updates even if AllowUpdate is True for the DataGrid control; in this case a trappable error occurs when the user tries to change the record.

© 2015 Microsoft