How to programatically add the sort glyph to a column?

My situation:

I've successfully disabled the default sort behavior and replaced it with my own sort code which does a fresh get from the server and lets the server resort the data.

After I get back the nicely sorted data though, I'd like to put the litte ^ or down arrow glyph on the appropriate column though.

How can I do this? Is there a property or something I can set in the Grid object?
April 2,
NM, found the solution in two lines of magic code:

// store column index
obj.setProperty("sort/index", 2);

// store sort direction
obj.setProperty("sort/direction", "descending");

Btw is there anywhere I can get a list of all the properties in the various object templates? Is there a list somewhere?
April 2,
Ok new question. In addition to putting a glyph on the sorted column, I'd also like to darken that column header (like the effect inside i-tunes if you've seen that).

I know there's code support to change header colors (just mouse over a header and it changes color).

I can't, however, figure out how to invoke said code on my own via a script.

Basically all I need is a piece of code that adds a new style like "darker" to a particular header.

Any help would be appreciated.
April 2,

This topic is archived.

See also:

Back to support forum