:: Forum >>
Cancel sorting options
Clicking on the column headers toggles sort order. I want to click once for ascending, again for descending, and again to turn sorting off. How do I accomplish this?
Kwooda
Tuesday, February 21, 2006
I am doing the following to accomplish my goal, which seems to work, but I cannot get the sort indicator to go away.
var saveDoSort = obj.onHeaderClicked;
function myDoSort(event,index,header) {
if (this.getSortDirection(index)=="descending") {
this.setSortColumn(index);
this.setSortDirection("",index);
} else {
if (saveDoSort) saveDoSort(event,index,header);
}
}
obj.onHeaderClicked = myDoSort;
How do I get the sort indicator to go away on the column header?
Kwooda
Tuesday, February 21, 2006
This is just a thought ... I haven't worked with sorting much.
Could you have a hidden column with the same value in every cell (ex. all have "1" in them). Then on the "sorting off" event maybe you could invoke sorting on the hidden column. Since the values are the same on each cell of the hidden column I don't think it would change the row order (that is a good thing). Also, I'm hoping that would cause the sort indicator to associate with the hidden column instead of the one clicked.
Note: All of this is theory and someone else may have an easier or better answer.
Happy Friday and I hope you don't feel ignored anymore :)
Rob Francis
Friday, February 24, 2006
Interesting idea. I'll give it a shot if I can't find another solution. Thanks! ;)
Kwooda
Friday, February 24, 2006
This topic is archived.
Back to support forum
Forum search