3.2.0

setting the sort indicator manually

Version 2.0

I must be doing something wrong but setting the sort index does not seem to be working... I'm trying doing it before the grid gets rendered.

var obj = new AW.UI.Grid;
obj.setHeaderText(["1","2","3"]);
obj.setRowCount(1);
obj.setColumnCount(3);
//obj.setSortColumn(2);
obj.setSortColumn("ascending", 2);
document.write(obj);

I cut out some stuff for ease of reading...

I'm just trying to default the grid to show a header with the sort indicator for a specific column. Can you please tell me what I am doing wrong? Thanks very much!
Joe Hudson
October 26,
//    set new sort indicator 
    this.setSortColumn(index); 
    this.setSortDirection("ascending", index);
Alex (ActiveWidgets)
October 26,
Doh!

Sorry, I see my mistake! Thanks, Alex.

Joe
Joe Hudson
October 26,
How do I clear the sort indicator and, thus, any sorting behavior?
Kwooda
February 23,
i got same question with Kwooda.
ppking
November 28,
i have find a way to make it:

obj.onSortDirectionChanging = function(){obj.setSortDirection("ascending");};
ppking
November 28,

This topic is archived.

See also:


Back to support forum