Hello Everyone,
I am trying to refresh the kendo grid in javascript, when a user click on refresh button. It is working fine in Mozilla browser but in IE11 it is not working properly.
In IE11 refreshing the grid is working one time after that couldn't be able to reload the grid (calling the action method). Please find the following code..
Controller:
public ActionResult SelectApprovalFlow([DataSourceRequest]DataSourceRequest request)
{
Request objRequest = ((Request)Session["Request"]);
return Json(GetApproverDetails(objRequest).ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
}
Grid:
@(Html.Kendo().Grid<MyProject.Model.GetApprovals>()
.Name("grdApprovalFlow")
.Columns(columns =>
{
columns.Bound(p => p.ApprovalID).Hidden(true);
columns.Bound(p => p.Approver).Width(120).Title("Approver").HeaderHtmlAttributes(new { style = "text-align:center;font-weight: bold" });
columns.Bound(p => p.StepDescription).Width(100).Title("Step").HeaderHtmlAttributes(new { style = "text-align:center;font-weight: bold" });
})
.AutoBind(false)
.DataSource(
dataSource => dataSource
.Ajax()
.Events(events => events.Sync("sync_handler"))
.Read(read => read.Action("SelectApprovalFlow", "Approval"))
)
)
Button:
<button id="btnApprovalFlow" onclick="return btnClick();">
My Button
</button>
Javascript:
function btnClick() {
$("#grdApprovalFlow").data('kendoGrid').dataSource.read();
return false;
}
Thank you so much for your help..