Skip to main content

BaseWizardPage.PageValidating Event

Enables you to specify whether page data is valid, and whether the page can be switched.

Namespace: DevExpress.XtraWizard

Assembly: DevExpress.XtraWizard.v24.2.dll

Declaration

public event WizardPageValidatingEventHandler PageValidating

Event Data

The PageValidating event's data class is WizardPageValidatingEventArgs. The following properties provide information specific to this event:

Property Description
Direction Gets whether the next or previous page is about to be activated.
ErrorIconType Gets or sets the type of icon displayed within an error message.
ErrorText Gets or sets the error text displayed within the error message box.
Valid Gets or sets whether the processed wizard page is valid.

Remarks

The PageValidating event is raised when the page is about to be switched, and allows you to specify whether its data is valid.

If page data is invalid, set the WizardPageValidatingEventArgs.Valid property to false. In this instance, the error message is displayed. Its text can be specified using the WizardPageValidatingEventArgs.ErrorText property. The page cannot be switched until it is valid.

private void wizardPage1_PageValidating(object sender, WizardPageValidatingEventArgs e) {
    e.Valid = IsValidLogin(teCustomerID.Text, tePswd.Text);
    if (!e.Valid)
        e.ErrorText = "The login information you supplied is not valid.";
}

The image below shows the result:

PageValidation

See Also