This question is locked. New answers and comments are not allowed.
Hello, I need help in defining the initial sort direction (ASC or DESC) of the grouping. In my code below, I grouped the grid entries based on the "Year". The entries are grouped perfectly except that the grouping is by default ascending (which in my case the group of the oldest year is shown first). Now all I wanted is to put the latest year at the top (descending). Now how would I translate this into code?
Thanks for your inputs.
.Sortable(sorting => sorting .SortMode(GridSortMode.MultipleColumn) .OrderBy(sortOrder => { sortOrder.Add(o => o.Place).Ascending(); sortOrder.Add(o => o.FullName).Ascending(); })).Groupable(grouping => grouping.Groups(groups => groups.Add(o => o.Year)))Thanks for your inputs.