Hello Konstantin,
I saw that demo before asking the question. In that demo what you're doing is extending the global validator and what I need is to create a local (custom) validator for the grid.
I need it in that way because I've a form and a grid in the same view and if I extend the global validator when I validate the form the rules defined in the global validator will be applied to the form validator as well.
Here's a snippet of what I'm doing
01.
<div>
02.
<form id=
"form1"
>
03.
</form>
04.
</div>
05.
06.
<div>
07.
@(Html.Kendo().Grid<ProductsModel>()
08.
.Name(
"grid"
)
09.
.....
10.
)
11.
</div>
12.
13.
<script type=
"text/javascript"
>
14.
$(
"#form1"
).kendoValidator({
15.
rules: {
16.
custom: function (input) {
17.
console.log(
"Custom rules for the form"
);
18.
return
true
;
19.
}
20.
}
21.
})
22.
</script>
As you can see in line 14 I'm creating a local validator for the form now what I need is to create another local validator for the grid would you please tell me how to create that validator? The grid is using .Editable(x => x.Mode(GridEditMode.InCell)).
Thank you.