Sorting Table Using Dojo


#1

Can anyone point me to a way to sort a table? I’ve got a lot of legacy code I’d like to add sorting to, and the prospect of ripping it all out and putting in really complex grid definitions just makes me ill.

Is there a simple way to bind a dgrid to an existing table?

Is there some other way that’s pretty easy to do?

Easy means not more than 1 javascript snippet, not having to re-define may data to come from a store.

Thanks.


#2

I believe you want the dgrid/GridFromHtml module, https://github.com/SitePen/dgrid/blob/master/GridFromHtml.js

Some examples may be found at http://dgrid.io/js/dgrid/test/GridFromHtml.html

Regards,
-Dylan