Column insertion?
Column insertion?
I would like to modernize this old tree of mine, possibly with JQuery and DataTables,
http://genomics.dk:8001/UTHCT/index.cgi?menu_1=orgs
As is, html is created on the server and the whole page resent for every click. The
column to the left can go away (click the 'Orgs' header) and be reinserted (select
'Node counts' in the pulldown menu). Nodes can be opened, closed and searched.
The tree and its columns is a table, where each node is a row.
To ajaxify this I could use DataTables, which can insert rows at defined places.
But i see no corresponding column function? it would good not to redraw the
whole tree, but just get the column data and conveniently insert it into the DOM
structure. Is this being planned or did I overlook the functionality?
Second, about styling, it looks like DataTables could be styled to look exactly as
this example .. there are no built in assumptions about the kind of table and such?
Greetings,
Niels Larsen
e-mail: niels@genomics.dk
skype: niels_larsen_denmark
http://genomics.dk:8001/UTHCT/index.cgi?menu_1=orgs
As is, html is created on the server and the whole page resent for every click. The
column to the left can go away (click the 'Orgs' header) and be reinserted (select
'Node counts' in the pulldown menu). Nodes can be opened, closed and searched.
The tree and its columns is a table, where each node is a row.
To ajaxify this I could use DataTables, which can insert rows at defined places.
But i see no corresponding column function? it would good not to redraw the
whole tree, but just get the column data and conveniently insert it into the DOM
structure. Is this being planned or did I overlook the functionality?
Second, about styling, it looks like DataTables could be styled to look exactly as
this example .. there are no built in assumptions about the kind of table and such?
Greetings,
Niels Larsen
e-mail: niels@genomics.dk
skype: niels_larsen_denmark
This discussion has been closed.
Replies
There are a number of assumptions that DataTables makes about a table (in part here: http://datatables.net/usage/#prerequisites ). It also assumes that colspan / rowspan is not used in the body - which may or may not be a limitation which will effect you here...
Allan
http://developer.yahoo.com/yui/datatable
which seems to be able to insert/delete columns (its down near the bottom) and works with YUI 3. I must also decide on JQuery or YUI3, but the work wont start until november, so I will look again by then. Perhaps YUI 3 and JQuery tools wont very well together, I'm new to Javascript but will find out. Those demos look easy to use and too good to ignore,
http://flowplayer.org/tools/demos/index.html
Niels
Yes indeed - the YUI DataTable component is superb - they've done a really great job with that - all of YUI in fact. I created DataTables originally as an experiment to see what the jQuery thing was all about (having used YUI previously) ... :-)
Each of DataTables and YUI DataTable each have their one strengths and weaknesses - as with everything - it's always best to scope out each option before deciding which to use. I've been planning for a long time to write a plug-in for DataTables which will add and delete columns - just never got around to it yet...
You shouldn't have any problem using YUI and jQuery together - although it is important of course to be aware of the fact they they are both running in tandem and might need a little bit of special consideration.
Regards,
Allan