Hello we have one grid with group by column as in below code.
@(Html.Kendo().Grid<Xyz>()
.Name("OwnerGrid")
.Columns(columns =>
{
columns.Bound(p => p.OwnerName).Hidden().ClientGroupHeaderTemplate("#= value #").HeaderHtmlAttributes(new { style = "text-align:left;" }).HtmlAttributes(new { style = "text-align:left;" });
columns.Bound(p => p.ShortDescription).Width("20%").HeaderHtmlAttributes(new { style = "text-align:left;" }).HtmlAttributes(new { style = "text-align:left;" });
columns.Bound(p => p.Description).Width("30%").HeaderHtmlAttributes(new { style = "text-align:left;" }).HtmlAttributes(new { style = "text-align:left;" });
columns.Bound(p => p.Status).Width("15%").HeaderHtmlAttributes(new { style = "text-align:left;" }).HtmlAttributes(new { style = "text-align:left;" });
columns.Bound(p => p.Date).Width("10%").Format("{0:MM/dd/yyyy}").HeaderHtmlAttributes(new { style = "text-align:right;" }).HtmlAttributes(new { style = "text-align:right;" });
})
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
.Read(read => read.Action("GetData", "Home"))
.Group(groups =>
{
groups.Add(p => p.OwnerName);
})
So here we have Group by with "OwnerName". Our requirement is when we sort by "ShortDescription" it should first sort by "OwnerName" and then by "ShortDescription". I know its possble by custom binding at server side - i took help from below article http://demos.telerik.com/aspnet-mvc/razor/grid/custombinding
But is it possible at client side? can we avoid server side trip? as .ServerOperation(false) works for normal grid.
@(Html.Kendo().Grid<Xyz>()
.Name("OwnerGrid")
.Columns(columns =>
{
columns.Bound(p => p.OwnerName).Hidden().ClientGroupHeaderTemplate("#= value #").HeaderHtmlAttributes(new { style = "text-align:left;" }).HtmlAttributes(new { style = "text-align:left;" });
columns.Bound(p => p.ShortDescription).Width("20%").HeaderHtmlAttributes(new { style = "text-align:left;" }).HtmlAttributes(new { style = "text-align:left;" });
columns.Bound(p => p.Description).Width("30%").HeaderHtmlAttributes(new { style = "text-align:left;" }).HtmlAttributes(new { style = "text-align:left;" });
columns.Bound(p => p.Status).Width("15%").HeaderHtmlAttributes(new { style = "text-align:left;" }).HtmlAttributes(new { style = "text-align:left;" });
columns.Bound(p => p.Date).Width("10%").Format("{0:MM/dd/yyyy}").HeaderHtmlAttributes(new { style = "text-align:right;" }).HtmlAttributes(new { style = "text-align:right;" });
})
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
.Read(read => read.Action("GetData", "Home"))
.Group(groups =>
{
groups.Add(p => p.OwnerName);
})
So here we have Group by with "OwnerName". Our requirement is when we sort by "ShortDescription" it should first sort by "OwnerName" and then by "ShortDescription". I know its possble by custom binding at server side - i took help from below article http://demos.telerik.com/aspnet-mvc/razor/grid/custombinding
But is it possible at client side? can we avoid server side trip? as .ServerOperation(false) works for normal grid.