any luck with this?
Hi,
My page displays results retreived from a database table. I would like to allow the user to order these reults based on table headings. How can I acheive this?
Any feedback is appreciated,
Regards
any luck with this?
Have the column headings be hyperlinks that send a request to a controller, with params that define how to sort, then using these params to sort your array or create your SQL.
Since Zend and Dojo play well together, you can remove the creation of an HTML table, and replace it with a dojo data grid. This took a while to figure out, but once done, enables sorting and read-on-demand paging fairly well.
Once thing I haven't found yet (and had to force into it) was the concept of allowing filters on each field found. Not a filter of available values in the grid, just free-text typing that could be used as a filter to the server-side query returning the result.
And on a side note, if anyone is aware of a declarative plugin for auto-displaying filter edits above each field of a grid, I would LOVE to hear from you about your suggestion.
Good luck with that.