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

Grouped column initially sorted descending

1 Answer 566 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Claudio
Top achievements
Rank 1
Claudio asked on 30 Aug 2013, 11:10 AM
Hi.

Is there a way to force descending order on a grouped column in Kendo Grid?

When I open the grid, I've got a list of operations grouped by operation data, but I want group ordered from most recent date.

I read that if I want to group and sort for the same field, the instruction is

group: [{ field: "OperationDate", dir: "desc" }]

Right?

What's the instruction for Razor Engine? Something like:

.Group(groups => groups.Add(p => p.OperationDate, ListSortDirection.Descending ) ?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 03 Sep 2013, 05:48 AM
Hello Claudio,

What you search for is a separate method called AddDescending

e.g.

.Group(groups => groups.AddDescending(p => p.OperationDate))


Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Claudio
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or