Purpose
Edit flags.
Class
Type
Access
Data Type
DWord
Description
bEditCellEvent:EditFlags contains different flags dependent on the EditMode of the event, by which the behavior of the event can be influenced.
The following flags are supported:
•EditMode: BEDIT_CREATE
•BEDIT_FLAG_SETVALUE
If the flag is set, in the edit control the current value of the cell is set.
If the flag is not set, no value in the edit control is set.
The flag is set automatically by bBrowser and must be removed if necessary in the callback method CellEdit().
•EditMode: BEDIT_END
•BEDIT_FLAG_SAVEVALUE
If the flag is set, the edit value is saved and the edit is finished.
If the flag is not set, the edit value is not saved and the edit is finished.
The flag is set automatically by bBrowser and must be removed if necessary in the callback method CellEdit().
Samples
With the following source code fragment the edit control with is initialized with own value:
METHOD CellEdit(oCellEditEvent) CLASS dtwTest
LOCAL dDate AS DATE
IF oCellEditEvent:EditMode=BEDIT_CREATE
oCellEditEvent:EditFlags := _Xor(DWORD(_CAST, oCellEditEvent:EditFlags),;
BEDIT_FLAG_SETVALUE)
ELSEIF oCellEditEvent:EditMode=BEDIT_INIT
dDate := CTOD(oCellEditEvent:Control:Server:FieldGet(#CDATE))
oCellEditEvent:EditControl:Value := dDate
ENDIF
:
With the following source code fragment it can be examined whether the flag BEDIT_FLAG_SAVEVALUE is set:
METHOD CellEdit(oCellEditEvent) CLASS dtwTest
IF _And(DWORD(_CAST, oCellEditEvent:EditFlags), BEDIT_FLAG_SAVEVALUE)>0
:
ENDIF
:
With the following source code fragment the flag BEDIT_FLAG_SAVEVALUE is deleted:
METHOD CellEdit(oCellEditEvent) CLASS dtwTest
IF oCellEditEvent:EditMode=BEDIT_END
:
oCellEditEvent:EditFlags := _Xor(DWORD(_CAST, oCellEditEvent:EditFlags),;
BEDIT_FLAG_SAVEVALUE)
:
See Also
Page url: http://www.YOURSERVER.com/index.html?bcelleditevent_editflags.htm