CanUndo
method (DataWindows)
Description
Tests whether Undo can reverse the most recent edit in the editable
control over the current row and column.
Applies to
|
DataWindow type |
Method applies to |
|---|---|
|
PowerBuilder |
DataWindow control |
Syntax
PowerBuilder
|
1 |
boolean dwcontrol.CanUndo ( ) |
|
Argument |
Description |
|---|---|
|
dwcontrol |
A reference to a DataWindow control |
Return value
Returns true if the last edit can be reversed (undone) using the
Undo method and false if the last edit cannot be reversed.
If dwcontrol is null, the method returns null.
Usage
PowerBuilder environment
For use with other PowerBuilder controls, see the section called “CanUndo” in PowerScript Reference.
Examples
These statements check to see if the last edit in the edit control
of dw_contact can be reversed; if yes the statements reverse it, and if no
they display a message:
|
1 2 3 4 5 |
IF dw_contact.CanUndo() THEN dw_contact.Undo() ELSE MessageBox(Parent.Title, "Nothing to Undo") END IF |
See also