Как обновить сетку интерфейса Kendo
Я пытаюсь обновить сетку пользовательского интерфейса Kendo, но пока не удалось. Кто-нибудь, пожалуйста, посоветуйте, что я пропустил или что я сделал не так?
У меня есть следующий код:
.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();
}