|
<Grid>
@(Html.EJ().Grid<object>("FlatGrid") .Datasource(ds => ds.Json((IEnumerable<object>)ViewBag.datasource).UpdateURL("/Grid/Update") .InsertURL("/Grid/Inser").RemoveURL("/Grid/Remove").Adaptor(AdaptorType.RemoteSaveAdaptor)) .AllowPaging() .EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing().EditMode(EditMode.Dialog); }) })
. . . . .
.ClientSideEvents(eve=>eve.ActionFailure("actionFailure")) . . . . . )
<actionFailure event>
function actionFailure(args) {
alert(args.error.error().statusText);
$("#" + this._id + "_dialogEdit").ejDialog("close"); // Close the dialog edit form
this.element.ejWaitingPopup("hide");//disable the Waiting popup } |