Tab

ASPxValidationSummary.ClientSideEvents Property

Gets an object that lists the client-side events specific to the editor.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

Declaration

public ValidationSummaryClientSideEvents ClientSideEvents { get; }
Public ReadOnly Property ClientSideEvents As ValidationSummaryClientSideEvents

Property Value

Type Description
ValidationSummaryClientSideEvents

A ValidationSummaryClientSideEvents object which allows assigning handlers to the client-side events available to the editor.

Remarks

The ClientSideEvents property provides access to the properties whose names correspond to the events available to an ASPxValidationSummary on the client side. These properties enable you to assign JavaScript handlers to the required client-side events of the ASPxValidationSummary.

Examples

The following section of the Validation Summary online demo illustrates how to customize the settings of the ASPxValidationSummary control.

This settings are specified within a panel by using the ASPxRadioButtonList, ASPxCheckBox editors.

protected void Page_Load(object sender, EventArgs e) {
    ApplyValidationSummarySettings();
    ApplyEditorsSettings();
    if(!IsPostBack && !IsCallback)
        ASPxEdit.ValidateEditorsInContainer(this);
}

private void ApplyValidationSummarySettings() {
    vsValidationSummary1.RenderMode = (ValidationSummaryRenderMode)Enum.Parse(typeof
        (ValidationSummaryRenderMode), rblRenderMode.SelectedItem.Value.ToString());
    vsValidationSummary1.ShowErrorAsLink = chbShowErrorAsLink.Checked;
}

private void ApplyEditorsSettings() {
    ASPxEdit[] editors = new ASPxEdit[] { tbName, tbEmail };
    foreach(ASPxEdit editor in editors) {
        editor.ValidationSettings.ValidateOnLeave = chbValidateOnLeave.Checked;
        editor.ValidationSettings.SetFocusOnError = chbSetFocusOnError.Checked;
    }
}
See Also