I'm new to Kendo UI and would appreciate your advice.
I have a Partial view that renders Kendo Grid:
<div class="accountsWindow" hidden="hidden">
@Html.Partial("AccountsGrid", context.CustomerAccounts)
</div>
The view: AccountsGrid.cshtml
@model IEnumerable<DAL.Model.CustomerAccount>
<div id="grid">
@(Html.Kendo().Grid(Model)
.Name("AccountsGrid")
.Columns(columns =>
{
columns.Bound(u => u.CUSTOMER_NO)
...
})
.Pageable().HtmlAttributes(new {id="AccGrid" })
)
</div>
My first problem is when I try to access the grid:
var grid = $("#AccGrid").data("kendoGrid");
It is undefined. Can it be because of hidden Partial?
And second- I would like to change existing dataSource for context.CustomerAccounts.Where(c=>c.CUSTOMER_NO == someValue) dynamically but cannot find a solution.