Thread: ZO_Helpers
View Single Post
10/12/14, 04:37 PM   #13
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
I did not suggest direct assignment because I was not sure the headers control would not get confused.

Originally Posted by skobyjay View Post
The code below gives me asc sorting, is there a "decending" equivalent of the statement below I can use in the Initialize method.

Code:
self.sortHeaderGroup:SelectHeaderByKey("name")
SelectHeaderByKey calls the same handler that's called when you click a header. If you click the same header again, it alternates between ascending/descending order.
Lua Code:
  1. -- setup sortHeaderGroup to order by name, without telling the owner (suppress callbacks)
  2. self.sortHeaderGroup:SelectHeaderByKey("name", ZO_SortHeaderGroup.SUPPRESS_CALLBACKS)
  3. -- switch to descending order and tell the owner
  4. self.sortHeaderGroup:SelectHeaderByKey("name")
  Reply With Quote