Skip to main content
Inspiring
January 26, 2009
Question

sorting columns

  • January 26, 2009
  • 3 replies
  • 547 views
Does any1 have a nice way to sort a recordset (create a hyperlink) on the column name and then re-sort the results?

Thanks,
Phil
This topic has been closed for replies.

3 replies

Inspiring
January 27, 2009
another option is to use a client-side solution.
many (most?) modern js frameworks like jQuery have this functionality
built-in or available as plug-ins.

for example, jQuery has a TableSorter plug-in that can do what you want
and a lot more. it is fairly easy to setup and use. it also has a Pager
add-on that can create table pagination for you, too.

you can check it out here:
jQuery: http://jquery.com/
TableSorter plug-in & Pager add-on: http://tablesorter.com/

hth

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Inspiring
January 27, 2009
Thanks for both responses. I'll check them both out!!

Phil
Inspiring
January 26, 2009
philliptackett wrote:
> Does any1 have a nice way to sort a recordset (create a hyperlink) on the column name and then re-sort the results?
>
> Thanks,
> Phil

The easiest way to build this kind of User Inteface is with the
<cfgrid...> control inside of a <cfform...> block.

This is a complex tag with *alot* of options. I'll leave it to the
documentation to explain all the different flavors (dhtml, flash,
applet) and options of the tag.

Inspiring
January 26, 2009
I forgot to mention that I have a SQL <cfquery> that I'm using as the initial data load.