FormDataSource.validateDelete Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Requests that the user confirm the deletion of a record from the data source.
public:
override bool validateDelete();
public override bool validateDelete ();
override this.validateDelete : unit -> bool
Public Overrides Function validateDelete () As Boolean
Returns
true if the deletion is performed successfully; otherwise, false.
Remarks
This method calls the validateDelete method on the data source table. The FormDataSource.validateDelete method is called by the FormDataSource.delete method. Use this method to add custom data validation checks whenever they are required. The validateDelete method can be overridden on a form data source by right-clicking the Methods node under the data source, pointing to Override Method, and then clicking validateDelete.
The following example does not call the super() method and returns true. This suppresses the display of the delete confirmation message box.
public boolean validateDelete()
{
// Do not display warning dialog.
return true;
}