:: Forum >>

Disable the default header sorting action, and make it sortable for the entire database ?


I have known how to disable the deafult header sorting action:

var header = new Active.Templates.Header;
header.setEvent("onmousedown", null);
obj.setTemplate("top/item", header);

Now if I want to put an image in the header, and then I can click the image to sort all data in database (across pages), how can I do it?

I have tried it like:
var myHeaders =
["<a href=/sortaction><img src=./sort.gif></a>", "x", "y", "z"];
obj.setColumnProperty("text", function(i){return myHeaders[i]});

Basically it works, but I wonder is it a best way?!

Stephen Kuo
Friday, November 19, 2004

This topic is archived.

Back to support forum

Forum search