我试图刷新剑道UI格但至今尚未成功。 会有人请指教一下我错过了或者我做错了什么?
我有以下代码:
.cshtml:
$('#btnRefresh').click(function (e){
$.ajax({
type: 'POST',
url: "@(Url.Content("~/Administration/RefreshAll/"))",
success: function () {
$("#Product").data("kendoGrid").dataSource.read();
$('#Product').data('kendoGrid').refresh();
//grid.refresh();
location.reload(true);
},
error: function (){
$("#btnRefresh").removeAttr('disabled');
}
});
});
控制器:
public ActionResult RefreshAll([DataSourceRequest] DataSourceRequest request)
{
db.ProcessAll();
Response.Cache.SetCacheability(HttpCacheability.NoCache);
return View();
}