- This topic is empty.
August 23, 2011 at 2:57 am #34038
I need to code a table that has two rather advanced features (at least when combined).
A) Columns have to be moveable (drag&drop)
B) The user has be to be able to decide which Columns he wants to see (it’s about comparing features…), so I need to provide an option to toggle each column on/off
For A, I found dragtable.js which works pretty good. (http://www.danvk.org/wp/dragtable/)
For B, I found the jQuery ColumnMananger plugin (http://p.sohei.org/stuff/jquery/columnmanager/demo/demo.html) which works fine, too.
When I combine both, it’s a complete mess. When I toggle a column off, then drag some columns around and then toggle to column from before on, it will re-appear but display the wrong content.
I know: I could sit down and think about this and write the code myself. However, I don’t believe that I’m the first person who wants those two features in one column. Do you guys know the solution to my problem? I did some research already, but didn’t find much yet…
Thanks in advance.
With kind regards,
Sebastian SchackAugust 23, 2011 at 2:58 am #85444
Oh, and I also need the first column to be fixed (as in: not moveable).August 23, 2011 at 5:12 am #85455TcooperMember
Take a look at http://www.datatables.net – more specifically http://www.datatables.net/release-datatables/extras/ColReorder/index.html and http://www.datatables.net/release-datatables/extras/ColReorder/colvis.html
Edit: One more you might need http://datatables.net/release-datatables/extras/ColReorder/fixedcolumns.htmlAugust 24, 2011 at 3:38 am #85571
Woah, thanks! I knew someone already did this AND documented it. :)