Hi,
I need an example on how to use an ajax async request inside an "addMethod" call from the grid component.
$.validator.addMethod("myFunction", function (value, element, params) {
$.ajax({
type: "GET",
url: 'MyFunction',
...
},
success: function (data) {
return
}
});
}, "Error");
});
With this code, the validator returns false before the ajax request completes. I did it this way instead of using the "remote" ValidationRule because I need to pass two parameters to the function on the server. If there is a better solution to this, please let me know.
Thank you.