This is a migrated thread and some comments may be shown as answers.

How Can Groupable Kendo UI Grid Using Javascript

1 Answer 106 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Efrain
Top achievements
Rank 1
Efrain asked on 19 Oct 2016, 04:48 PM

I'm using kendo html helper mvc with the next code in the View: 

@(Html.Kendo().Grid(Model)
            .Name("Grid")
            .HtmlAttributes(new { })
            .Columns(columns =>
            {
                columns.LoadSettings(new List<GridColumnSettings>() { new GridColumnSettings() { Hidden = true } });
                columns.Bound(c => c.TextCol1).Hidden(true);
                (....)
            })
            .RowTemplate(@<div class="objLst">
            <div class="row">... ... ...</div ></div>)

 

I need to group the elements of the grid using javascript. I have the next code:

var grid = $("#Grid").data("kendoGrid");
grid.dataSource.group({field:"TextCol1" });

 

but when I run the javascript instruction, the application (kendo grid) makes an GET request to the server to group the data. I need that the grouping run only on the client side.

It's possible? Or I should migrate all code to javascript?

Thank you.

 

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 21 Oct 2016, 11:34 AM
Hello Efrain,

Such requirement could not be achieved with server binding and if you need to perform the grouping on client-side you need to use the AJAX binding and disable the server operations of the data source:
Hope this helps.


Regards,
Konstantin Dikov
Telerik by Progress
Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
Tags
Grid
Asked by
Efrain
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or