ValidationRulesFactory.AddCompare() Method
Adds a validation rule that checks if an editor’s value is equal to another editor’s value.
Namespace: DevExtreme.AspNet.Mvc.Factories
Assembly: DevExtreme.AspNet.Core.dll
Declaration
public CompareRuleBuilder AddCompare()
Returns
Type | Description |
---|---|
CompareRuleBuilder | An instance of CompareRuleBuilder. |
Remarks
Refer to Validate Editors Used in Composite Controls for more information.
@(Html.DevExtreme().DataGrid()
.Columns(columns => {
columns.Add().ValidationRules(rules => {
rules.AddCompare()
// call methods to specify nested options
});
})
)
See Also