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

ValidationSettings.CausesValidation Property

Gets or sets a value that specifies whether validation is performed when the editor is set to validate when a postback occurs.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.2.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(false)]
public bool CausesValidation { get; set; }

Property Value

Type Default Description
Boolean false

true if validation is performed when the editor is set to validate when a postback occurs; otherwise, false.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to CausesValidation
ASP.NET Bootstrap Controls BootstrapSchedulerDateNavigatorProperties
.ValidationSettings .CausesValidation
ASP.NET Web Forms Controls ASPxEdit
.ValidationSettings .CausesValidation
EditProperties
.ValidationSettings .CausesValidation

Remarks

If the CausesValidation and ASPxEdit.AutoPostBack properties are set to true, the validation of the editor forces a whole group (specified via the ValidationSettings.ValidationGroup property) validation.

Example

View Example

<dx:ASPxComboBox ID="cbComboBox2" runat="server" AutoPostBack="True">
    <Items>
        <dx:ListEditItem Value="" Text="(Empty)" />
        <dx:ListEditItem Value="Some value" Text="Some value" />
    </Items>                    
    <ValidationSettings CausesValidation="True" ValidationGroup="CausesValidationDemoGroup">
        <RequiredField IsRequired="True" ErrorText="Select not empty value." />
    </ValidationSettings>
</dx:ASPxComboBox>
<br />
<dx:ASPxComboBox ID="cbComboBox3" runat="server" AutoPostBack="True">
    <Items>
        <dx:ListEditItem Value="" Text="(Empty)" />
        <dx:ListEditItem Value="Some value" Text="Some value" />
    </Items>                    
    <ValidationSettings CausesValidation="True" ValidationGroup="CausesValidationDemoGroup">
        <RequiredField IsRequired="True" ErrorText="Select not empty value." />
    </ValidationSettings>
</dx:ASPxComboBox>
<br />
<dx:ASPxComboBox ID="ASPxComboBox2" runat="server" AutoPostBack="True">
    <Items>
        <dx:ListEditItem Value="" Text="(Empty)" />
        <dx:ListEditItem Value="Some value" Text="Some value" />
    </Items>                    
    <ValidationSettings CausesValidation="True" ValidationGroup="CausesValidationDemoGroup">
        <RequiredField IsRequired="True" ErrorText="Select not empty value." />
    </ValidationSettings>
</dx:ASPxComboBox>
See Also