Hi,
I need setup custom validation on grid fields dynamically,
because code processes many forms from database and
I know a set of columns only at runtime. I took Telerik's example
for checking and changed something a little bit (see index.zip) and
got the next results.
When I set name of the field statically ("ProductName") everything is OK.
When I try use in string concatenation gridColumns[i].field I get in console
message that variable is not defined. When I set fieldName = gridColumns[i].field
I don't receive any message, I see custom validation on the column
(see kendoui-grid-custom-validator.jpg), but custom validation doesn't work.
Standard validation works (required: true).
Is it possible to use variables from closure in javascript? Or there is
another way to define it?
I need setup custom validation on grid fields dynamically,
because code processes many forms from database and
I know a set of columns only at runtime. I took Telerik's example
for checking and changed something a little bit (see index.zip) and
got the next results.
When I set name of the field statically ("ProductName") everything is OK.
When I try use in string concatenation gridColumns[i].field I get in console
message that variable is not defined. When I set fieldName = gridColumns[i].field
I don't receive any message, I see custom validation on the column
(see kendoui-grid-custom-validator.jpg), but custom validation doesn't work.
Standard validation works (required: true).
Is it possible to use variables from closure in javascript? Or there is
another way to define it?