ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.EditActive Property

Gets or sets a value indicating the editing status of the current cell.

[Visual Basic]

Public Property EditActive As Boolean

[C#]

public bool EditActive {get;set;}

[Delphi]

public property EditActive: Boolean read get_EditActive write set_EditActive;

Remarks

If this property returns True, then the current cell is currently being edited by the user. If False, then no editing is in progress.

If the grid is not already in edit mode, setting EditActive to True will initiate editing on the current cell. The caret will be positioned at the end of the cell and the ColEdit event will be triggered.

If the grid is already in edit mode, setting EditActive to False will exit edit mode. If the cell has been modified, this will trigger the following events: BeforeColEdit, AfterColUpdate, and AfterColEdit.

Note: To cancel editing completely, set EditActive to False.

The EditActive property does not correspond to the pencil in the RecordSelector column. The pencil reflects the state of the grid's DataChanged property.

Example

The following code initiates editing on the current cell:

·      Visual Basic

       Me.C1TrueDBGrid1.EditActive = False

·      C#

       this.c1TrueDBGrid1.EditActive = false;

·      Delphi

       Self.C1TrueDBGrid1.EditActive := False;

See Also

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


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