:: Forum >>

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
Wednesday, October 26, 2005
// set new sort indicator
this.setSortColumn(index);
this.setSortDirection("ascending", index);
Alex (ActiveWidgets)
Wednesday, October 26, 2005
Doh!

Sorry, I see my mistake! Thanks, Alex.

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

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

This topic is archived.


Back to support forum

Forum search