We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

MVC grid EditMode.Dialog insert action freezes after server error


we are using the latest version of MVC Components. We have a page with the following code

    .Datasource(ds => ds.Json((IEnumerable<object>)Model)
    .EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing().EditMode(EditMode.Dialog); })
    .ToolbarSettings(toolBar => toolBar.ShowToolbar().ToolbarItems(items =>
    .PageSettings(page => page.PageSize(20))
    .Columns(col =>
            .ValidationRules(v => v.AddRule("required", true).AddRule("number", true))
            .ClientSideEvents(events => { events.ActionFailure("OnActionFailure"); })
    function OnActionFailure(args) {
        alert(args.error.status + ':' + args.error.statusText, 'error');

When we create a new object, the dialog form appears, we set the data and send them through the ajax call to the server.When the server responds with an error (throws dbexception for example) the triggered alert shows the error but when we close the alert dialog the page still shows the insert dialog form with the circular waiting popup. Is there a way to cancel the insert dialog form and get back to the grid?


1 Reply

VA Venkatesh Ayothi Raman Syncfusion Team April 20, 2016 09:44 AM UTC

Hi Dimitris,

Thanks for contacting Syncfusion support.

If any server side error is thrown then grid waiting popup will load and to hide the waiting popup and get back to the grid we can use the actionFailure event. This event triggered for every grid action server failure event. Refer to the sample, code sample and Help document,

Sample: http://www.syncfusion.com/downloads/support/directtrac/general/7z/RemoteSaveAdaptorSample137393794

Code example:



                   .Datasource(ds => ds.Json((IEnumerable<object>)ViewBag.datasource).UpdateURL("/Grid/Update")



                       .EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing().EditMode(EditMode.Dialog); })



                  . . . . .



                 . . . . .



<actionFailure event>

function actionFailure(args) {


        $("#" + this._id + "_dialogEdit").ejDialog("close"); // Close the dialog edit form

        this.element.ejWaitingPopup("hide");//disable the Waiting popup


Help document: http://help.syncfusion.com/js/api/ejgrid#events:actionfailure

If we misunderstood your query, then provide more details about that.

Venkatesh Ayothiraman.

Live Chat Icon For mobile
Up arrow icon