Manu
Manu

Reputation: 1470

Multiple default sorts in Kendo UI grid

I'd like to set 2 default initial sort criteria for a kendo grid. I know how to set one sort criterium like this:

sort: { field: "sampleField", dir: "asc" }

But I fail to come up with a syntax to set up 2 criteria. Can someone show me how to do this? Regards, Manu

Upvotes: 1

Views: 1815

Answers (1)

Sean Ch
Sean Ch

Reputation: 614

kendo ui grid using html5 murtiple default sort

Make sure you specify sort on the Datasource like this

 sort: [
            {field: "field_1", dir: "asc"},
            {field: "field_2", dir: "desc"}
        ]

Here is the live working demo

murtiple default kendo sort

For more details look into this RETRIEVE USER PHOTOS FROM ACTIVE DIRECTORY?

Upvotes: 6

Related Questions