我有以下ajax脚本。
$.ajax({
url: url,
type: "DELETE",
dataType: "text",
success: function (data) {
var grid = $('#rolesgrid').ejGrid("instance");
grid.refreshContent();
$('#rolesgrid_delete').css('visibility', 'hidden');
renameConditionType(grid);
},
error: function (xhr, textStatus, errorThrown) {
showDialogMessage('Page error', errorThrown, 'danger');
}
});
当我通过调用函数grid.refreshContent()
提出请求时。调用下一个函数renameConditionType(grid)
。第二个特定列的更改上下文。
当函数grid.refreshContent()
的请求完成时。它覆盖了函数renameConditionType(grid)
的结果。
如何从功能grid.refreshContent()
请求时等待。我使用syncfusion javascript网格。
当我们使用refreshContent方法时,将触发ejGrid的actionComplete事件。在这种情况下,您可以使用参数将requestType检查为刷新以满足您的要求。
有关actionComplete事件和refreshContent方法的详细信息,请参阅以下文档。
https://help.syncfusion.com/api/js/ejgrid#events:actioncomplete
https://help.syncfusion.com/api/js/ejgrid#methods:refreshcontent
如果您仍然遇到任何复杂问题,请通过以下详细信息与我联系。