I did not suggest direct assignment because I was not sure the headers control would not get confused.
Originally Posted by skobyjay
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:
-- setup sortHeaderGroup to order by name, without telling the owner (suppress callbacks)
self.sortHeaderGroup:SelectHeaderByKey("name", ZO_SortHeaderGroup.SUPPRESS_CALLBACKS)
-- switch to descending order and tell the owner
self.sortHeaderGroup:SelectHeaderByKey("name")