Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1355
Validate all editor and show error message if form has any errors when submit by ajax
posted

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!