how can I access grid row count with Ajax binding in Telerik ASP.Net MVC grid? I need to display total in a footer, see code snippet below. The total has to update on insert and delete.
With server binding, there is @Model.Count(). How can I do the same thing with Ajax binding?
thank you!
@{
Html.Telerik()
.Grid<ContractMonth>()
.Name("contractMonthGrid")
.DataBinding(dataBinding => dataBinding
.Ajax()
.Select("_AjaxBinding", "ContractMonth")
.Insert("_AjaxInsert", "ContractMonth")
.Delete("_AjaxDelete", "ContractMonth")
)
.DataKeys(keys => keys.Add(c => c.Id))
.ToolBar(commands => commands.Insert())
.Columns(columns =>
{
columns.Bound(o => o.StartDate).EditorTemplateName("Date").FooterTemplate(@<text>@Model.Count()</text>);