I see in the docs how to enable the client to do multi-column sorting. however, I don't see how I can set up the initial orderby to include multiple columns. What would the syntax for that be?
BOb
2 Answers, 1 is accepted
0
Accepted
Petur Subev
Telerik team
answered on 04 Jun 2012, 08:11 AM
Hi Bob,
Basically you can set the sorting order initially for multiple columns like this:
.Sortable(sorting => sorting
.SortMode(GridSortMode.MultipleColumn)
.OrderBy(order =>
{
order.Add(c => c.ShipCountry).Ascending();
order.Add(c => c.OrderID).Descending();
})
)
Regards,
Petur Subev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.