DataWindow.DeleteValidated Method | |
Delete the current record in the attached server only if it passes its validation rules and update the window based on the change.
Namespace:
VO
Assembly:
VOGUIClasses (in VOGUIClasses.dll) Version: 2.21
Syntax VIRTUAL METHOD DeleteValidated() AS USUAL
public virtual Usual DeleteValidated()
Request Example
View SourceReturn Value
Type:
Usual
TRUE if successful; otherwise, FALSE.
Remarks
When executed successfully, the data server from which the record was deleted sends a NotifyDelete message to all of its clients, including this data window.
This method checks validation status before allowing a delete operation. If the window contains invalid data, the user is asked if the data should be discarded or corrected before the delete operation is continued. If this behavior is not desired (perhaps because the application does not use recall or the window is to be used only with servers that do not support recall of deleted records), use DataWindow:Delete().
With some servers (notably DBServer), a deleted record is not removed from the server but is simply marked as deleted. Marked records are removed only when the file is packed, and until such time can be recalled. (With DBServer, the current setting of the SetDeleted() function affects whether deleted records are visible.) Changes that have been made to fields are recorded in the record before it is deleted; if the field is subsequently recalled, it correctly reflects any changes made before the delete operation.
Tip |
---|
Do not confuse clearing with deleting. Clearing a structure (such as a record or field) removes its contents. Deleting a structure, on the other hand, removes the actual structure. |
See Also