kendo ui mvc grid refresh jQuery / Kendo UI Grid
MVC Refresh JQuery
.Name("GridOrders")
.Columns(columns =>
{
columns.Bound(p =>
p.OrderNumber).Title("Order Detail").Filterable(true);
})
.ClientRowTemplate(Html.Partial("_OrderTabs").ToHtmlString())
.DataSource(ds => ds
.Ajax()
.Sort(srt => srt.Add(e =>
e.IDEPOrderID).Descending())
.Read(read => read.Action("GetOrders", "Orders"))
.PageSize(PageSize)
)
.Events(e => e.DataBound("onDataBoundOrders"))
.Pageable()
.Sortable()
.Resizable(e => e.Columns(true))
.Pageable(pager => pager
.Refresh(true)
)
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str =>
str.Clear()
.StartsWith("Starts
with")
.EndsWith("Ends
with")
.Contains("Contains")
.DoesNotContain("Not
contains")
)
)
)
)
JQuery / JavaScript
Code for Refresh after UI Actions.
function refreshKendoUiGrid()
{
//THE BELOW CODE IS USED FOR
REFRESH THE DATA.
var grid = $("#GridOrders").data("kendoGrid");
if (grid != null) {
grid.dataSource.read();
}
}