Hello!
Can you help me!
Here is my issue
I have a form that has many editor. i want to submit that form by ajax after i clicked save button. here is my code
$("#btnSave_PositionMaster").click(function (e) { e.preventDefault(); $("#calculateLoadingIndicator").show(); $("#grdCostOfFunds").igGrid("saveChanges"); $("#grdFeeSchedule").igGrid("saveChanges", function (data) { if (data.Success != true) { //show error } }); $.ajax({ url: '@Url.Action("Edit","Position")', type: 'post', dataType: 'json', data: $('#Frm_PositionMaster').serialize(), success: function (data) { $("#calculateLoadingIndicator").hide(); if (data.Status == "Ok") { $("#lblErrorMessage").empty(); alert("Position is saved"); //window.location.reload(); } else { $("#lblErrorMessage").empty(); $("#lblErrorMessage").append(data.SaveErrorMessage); } } }); });
My issuer is i can not validate form editor and show error if it is invalid
Can you suggest me 1 solution to resolve this problem!
I need to urgent helper.
Thanks you very much!
who can help me?
Hello Cuong Tran,
Thank you for posting in our forums!
You can trigger the validators to run by setting certain options. The formSubmit, onblur, onchange, and onsubmit options are some options that will trigger the validation automatically. You can also call the validate method.
You can also see a sample of using the validators here:
http://www.igniteui.com/editors/validation
The following documentation also provides information on setting up editors' validation settings in MVC:
http://www.igniteui.com/help/configuring-asp.net-mvc-validation
If you need further assistance with this, please let me know.