- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Table with moveable columns that can also be toggled on/off
Hey there.
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 Schack
Oh, and I also need the first column to be fixed (as in: not moveable).
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.html
Woah, thanks! I knew someone already did this AND documented it. :)