ValidationRulesFactory.AddCompare() Method
In This Article
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
C#
public CompareRuleBuilder AddCompare()
#Returns
Type | Description |
---|---|
Compare |
An instance of Compare |
#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