15
剣道UIグリッドをリフレッシュしようとしていますが、まだ成功していません。誰かが私が逃したものや何が間違っているのかアドバイスしてもらえますか?剣道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();
}
public void ProcessAll()したがってJSONとして返すことができません – Spidey
モデルにリストオブジェクトを渡す必要があります。 – HaBo
ありがとう私はそれを試してみます – Spidey