Does Kendo UI Grid expose a method to check if the model state is valid? -


i'm displaying kendo ui grid in modal. i've got few custom validations hooked working fine. when modal's "save" button clicked, need able check whether grid in valid or invalid state.

since i'm using custom validation, it's possible me keep running track of errors , check error count upon modal closing, hoping kendo ui grid kept , exposed easy mygrid.isvalid() or such thing.

if use web-api on server side call modelstate.isvalid

more this

what mean custom validation?

if using kendo custom validation in reference reference way user cant enter wrong values in editor. if want isvalid option, way need impliment kendo.validator. define validation rools in model , call validate():

// attach validator container , reference var validatable = $("#myform").kendovalidator().data("kendovalidator");  $("#save").click(function() {   //validate input elements , check if there errors   if (validatable.validate() === false) {     // errors , write them out "errors" html container     var errors = validatable.errors();     $(errors).each(function() {       $("#errors").html(this);     });   } }); 

validator in kendo docs


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -