Skip to main content
Tab

ASPxValidationSummary.ShowErrorAsLink Property

Gets or sets whether the errors should be displayed within an editor as links.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

Property Value

Type Default Description
Boolean true

true if the errors are displayed as hyperlinks; otherwise, false.

Remarks

The ASPxValidationSummary represent a block for displaying the list of errors of the validated editors on the form.

If the ShowErrorAsLink property is set to true, the errors are displayed as hyperinks that when clicked, move focus to the corresponding editor.

Example

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