ButtonSettings.ValidationContainerID Property
Gets or sets the ID of the naming container for those editors for which the button causes a validation.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v24.2.dll
Declaration
Property Value
Type | Description |
---|---|
String | A string value that specifies the naming container’s ID. |
Remarks
Use the ValidationContainerID property to specify the ID of the naming contaner for those child controls for which the button forces a validation, when clicked.
This property has effect only when the ButtonSettings.CausesValidation property is set to true. When you specify a value for the ValidationContainerID property, only the verifiable controls that are contained within the specified naming container are validated when the button is clicked.
The functionality of the ValidationContainerID property is affected by whether or not the ButtonSettings.ValidationGroup property is assigned. The possible cases of synergy between these two properties are listed below.
- If only the ValidationGroup property is assigned, all controls belonging to the specified validation group are validated.
- If only the ValidationContainerID property is assigned, all controls in the specified container are validated except for controls with assigned validation groups.
- If both properties are assigned, only controls belonging to the specified validation group are validated within the specified container.
- If both properties are unassigned, all editors not belonging to any validation group are validated.
Note that a group of input controls can also be validated on the client, by using the following client static methods: ASPxClientEdit.ValidateEditorsInContainer, ASPxClientEdit.ValidateEditorsInContainerById, ASPxClientEdit.ValidateGroup.