Author Topic: Default initial sort direction for column  (Read 1820 times)

codecatalysts

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 1
    • View Profile
Default initial sort direction for column
« on: October 18, 2017, 11:12:34 pm »
Is there a way to set the initial direction a column is sorted when clicked? Currently when a column is clicked to be sorted it is sorted in ascending order by default but I would rather it be sorted by descending for select/specified columns.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6264
    • View Profile
Re: Default initial sort direction for column
« Reply #1 on: October 20, 2017, 09:51:11 am »
There is no declarative option for it.

Sorting direction or whole sorter can be programmatically customized by modifying ui.sorter parameter and comparing it with ui.oldSorter parameter in the beforeSort event.

https://paramquery.com/pro/api#event-beforeSort