Copy link to clipboard
Copied
I would like an easy way to change the order of items when I output them from a query.
Can anyone please tell me the best way to go about it?
I would like arrows pointing up or down next to each item. When each arrow is clicked, the page refreshes and the record moves up or down the recordset.
Can anyone please help?
Thankyou
Copy link to clipboard
Copied
Sounds like you want a nice UI to sort things. You can do it with CF, by
passing a paramater to your query in its Order By clause, or use can use
something like jquery javascript to do the sorting on the browser level.
http://trirand.com/blog/jqgrid/jqgrid.html
Copy link to clipboard
Copied
Easiest way is to output the table and then use jQuery and the DataTables
plugin to add sorting.
http://jquery.com/
http://datatables.net/
Copy link to clipboard
Copied
You could also use the <cfgrid> tag. This is probably the easiest way but might not be the best way. You will be limited on the look and feel of the table that is produced.
Copy link to clipboard
Copied
I have never had good luck with cfgrid.
I would look at jquery and the like for a modern, usable solution.