Form Editor, MVC Model Validation

Mar 17, 2013 at 5:33 PM
I may be looking in the wrong area, but is there a good example of using the pop-up form with the grid helper and model validation? Such that I return X type of object and it tells the form grid "here's the errors" etc.

I don't know why I can't seem to figure this out. It's probably right in front of me.

Mar 17, 2013 at 5:39 PM
And looks like my question may be answered 20 minutes earlier when you released it ;)
Mar 17, 2013 at 5:42 PM
Or not, looks like I need help still...
Mar 17, 2013 at 6:18 PM

If I've understood you correctly you want to perform the validation on the server side after the POST request and return the results back to jqGrid. For such scenario there is no direct support in jqGrid (also the helper at this point doesn't bring anything new to the table, just the built into jqGrid validation rules). The best way to achieve what you want is to take advantage of loadError callback. You can find a sample of functionality which is using this callback in following StackOverflow answer by Oleg:

Tomasz Pęczek