Export (0) Print
Expand All
A
Expand Minimize

Visual Basic: DataGrid Control

Visual Studio 6.0

AllowDelete Property

See Also   Example   Applies To

Returns or sets a value indicating whether the user can delete records from the Recordset object underlying a DataGrid control.

Syntax

object.AllowDelete [= value]

The AllowDelete 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 a user can delete records, as described in Settings.

Settings

The settings for value are:

Setting Description
True Users can delete records from the Recordset object underlying the DataGrid control.
False Users can't delete records from the Recordset underlying the DataGrid control.

Remarks

Use the AllowDelete property to prevent the user from deleting records from the Recordset through interaction with the DataGrid control.

The underlying Recordset may not enable deletions even if the AllowDelete property is True for the DataGrid control. In this case, an error occurs when the user tries to delete a record.

Note   After deleting a record from a DataGrid control, you should use the Refresh method on it to force the DataGrid to update. Otherwise, although a record has been deleted from the underlying recordset, the record will still show in the DataGrid.

Show:
© 2014 Microsoft