ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.AllowUpdate Property

Gets or sets a value indicating the ability of a user to modify data.

[Visual Basic]

Public Property AllowUpdate As Boolean

[C#]

public bool AllowUpdate {get;set;}

[Delphi]

public property AllowUpdate: Boolean read get_AllowUpdate write set_AllowUpdate;

Remarks

If True (the default), the user can modify data in the C1TrueDBGrid control.

If False, the user cannot modify data in the C1TrueDBGrid control.

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

The underlying data source may not permit updates even if the AllowUpdate property is True for the C1TrueDBGrid control. In this case, a trappable error occurs when the user tries to change the record.

Example

The following code uses the AllowUpdate property to display read-only data in the grid:

·      Visual Basic

       Me.C1TrueDBGrid1.AllowUpdate = False

·      C#

       this.c1TrueDBGrid1.AllowUpdate = false;

·      Delphi

       Self.C1TrueDBGrid1.AllowUpdate := False;

See Also

C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.