Skip to main content
A newer version of this page is available. .

ASPxClientGlobalEvents.ValidationCompleted Event

Occurs on the client side after the validation initiated for a DevExpress web control (or a group of DevExpress web controls) has been completed.

Declaration

ValidationCompleted: ASPxClientEvent<ASPxClientValidationCompletedEventHandler<ASPxClientGlobalEvents>>

Event Data

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

Property Description
container Gets a container object that holds the validated control(s).
firstInvalidControl Gets the first control (either visible or invisible) that hasn’t passed the validation applied.
firstVisibleInvalidControl Gets the first visible control that hasn’t passed the validation applied.
invisibleControlsValidated Gets a value that indicates whether validation has been applied to both visible and invisible controls.
isValid Gets a value specifying whether the validation has been completed successfully.
validationGroup Gets the name of the validation group name to which validation has been applied.

Remarks

Each time validation initiated for a DevExpress web control or a group of DevExpress web controls is completed, the ValidationCompleted event is generated. This event fires after all ASPxClientEdit.Validation client events of the validated DevExpress web controls.

A handler of the ValidationCompleted event is a suitable place to find out whether all DevExpress web controls have passed the validation (by analyzing the ASPxClientValidationCompletedEventArgs.isValid property). You can access the first control that failed the validation (by using the ASPxClientValidationCompletedEventArgs.firstInvalidControl or ASPxClientValidationCompletedEventArgs.firstVisibleInvalidControl property), obtain the container of the validated controls (ASPxClientValidationCompletedEventArgs.container) or the name of their validation group (ASPxClientValidationCompletedEventArgs.validationGroup).

For instance, the ValidationCompleted event might be helpful if you validate editors located within different tab pages of the ASPxPageControl and need to move input focus to an invalid editor within a non-active tab page.

Example

The complete sample project is available in the DevExpress Code Central database at E942.

<script runat="server">
     protected void ASPxGlobalEvents1_ValidationCompleted(object sender, 
     DevExpress.Web.ValidationCompletedEventArgs e) {
     lErrorMessageNotEqual.ClientVisible = !tbPassword.Value.Equals(tbConfirmedPassword.Value);
     }
</script>
...
<dxge:ASPxGlobalEvents id="ASPxGlobalEvents1" runat="server" 
OnValidationCompleted="ASPxGlobalEvents1_ValidationCompleted">
    <ClientSideEvents ValidationCompleted="OnValidationCompleted" />
</dxge:ASPxGlobalEvents>
...
See Also