2 questions: 1)lossing divs inTH cell 2)column resize
2 questions: 1)lossing divs inTH cell 2)column resize
Hi there,
First of all sorry for my bad English, I'm Dutch ;-)
Secondly I must say that this is a great plugin that comes in handy many times!!
But I have 2 questions:
1) HTML code in cell disapears after handled by DataTables
When I have made a table like this:
Name of col 1
Name of col 2
Name of col 3
Data cell 1
Data cell 2
Data cell 3
the THEAD looks like this after been handled by DataTables:
Name of col 1
Name of col 2
Name of col 3
I lost my div's. I want to use them because I want to give TH a background-image and it default has the sorting image. Is there a way to do that
2) Resize columns
Will there be in the futere a option to resize column width by draging for example the right border of the TH to left or right (like this plugin: http://www.ita.es/jquery/jquery.grid.columnsizing.htm) I now use a extra plugin to make this happen
Tnx in advance for your reaction
Greetings Wim
First of all sorry for my bad English, I'm Dutch ;-)
Secondly I must say that this is a great plugin that comes in handy many times!!
But I have 2 questions:
1) HTML code in cell disapears after handled by DataTables
When I have made a table like this:
Name of col 1
Name of col 2
Name of col 3
Data cell 1
Data cell 2
Data cell 3
the THEAD looks like this after been handled by DataTables:
Name of col 1
Name of col 2
Name of col 3
I lost my div's. I want to use them because I want to give TH a background-image and it default has the sorting image. Is there a way to do that
2) Resize columns
Will there be in the futere a option to resize column width by draging for example the right border of the TH to left or right (like this plugin: http://www.ita.es/jquery/jquery.grid.columnsizing.htm) I now use a extra plugin to make this happen
Tnx in advance for your reaction
Greetings Wim
This discussion has been closed.
Replies
1. DataTables certainly shouldn't strip out the HTML in your table. I've just tried it with 1.4.3 and 1.5 beta 7 and it works as expected for me (the HTML is retained). Could you confirm which version you are using? Also, could you paste your initialisation code (or better yet an example page)? Using sTitle for the columns would cause this behaviour (since the JS defined title takes precedence).
2. Re-sizeable columns is on my to-do list. It's not a particularly high priority at the moment (finishing the unit tests and getting 1.5 out, plus a number of other things need to be done first). It's certainly a nice to have...
Thanks,
Allan
tnx for your quick reaction. I think I have version 1.2 so I need to upgrsde. I will do that Sunday. I now need to go to bed, it's almost 2330 here
Tnx again and I'll let you know
Greetings
Wim
Yup - DataTables 1.2 was most destructive when it came to DOM handling, completely erasing the thead on initial draw, and tbody on every draw! This was the case in 1.3 as well, but the big new feature of 1.4 was it's non-destructive DOM interaction. 1.4 (and 1.5 beyond that) have a host of new features, options and general improvements, and will address the specific problem you are looking at.
Regards,
Allan
Tnx for your quick reply!!!!
I updated to version 1.4.3 and it works!!!!!! The DIV in the TH is showing a background image, but now I can't see the sorting-images anymore. I tried to use "z-index" but that doesn't help.
This is the link: http://www.fouroaks.nl/testexplorer (please don't laugh, I just use JQUERY a few months)
(I just started using JQUERY and, that's the problem with me ;-), I want to build my own online fileexplorer.
So I used a few plugins and edited them.)
Hope you have a tip for me
Tnx
Wim
Forget to say that explorer is still in development :-)
Good to hear that works :-). Your explorer looks very smooth - nice one.
Regarding the background image, it's not surprising that you can't see the sorting image since you've got your row.gif image on top of it (disabling that image shows the sorting image underneath). Firebug is probably the best way of seeing this btw.
So there are two options off the top of my head:
1. Put row.gif on the TH elements and then have sorting image on top of that using your div (th.sorting_asc div.thead_bg { background-image... }; etc)
2. Add a sorting bit to your row.gif (so you would have row_asc.gif and row_desc.gif).
Allan
Did your fingers grow on your laptop/PC that you react that FAST ;-)
I tried your 1st solution and that works, very simple and effective, and mostly when it is simple, I can't find it.
Tnx for your compliment about the explorer, I think it's smooth to, but there is still a lot do do, but mostly a lot to learn.
Good luck with your project. Btw, is there a possibility that people get an email when new version is released?
Have a nice Sunday
Greetings
Wim
You've caught me at a good time ;-). I'm doing a little dev work on DataTables at the moment anyway, and it's always great to see how DataTables is being used - makes the development that little bit easier and provides more direction...
Regarding an e-mail for updates - I hadn't thought of that before, I might look into that if there is more interest (anyone else want to put their hand up?).
Having said that all DataTables releases are noted in the DataTables RSS feed: feed://www.datatables.net/rss.xml . So if you use a feed reader at all, you could add that to your subscription list.
Regards,
Allan
How many hours are you making for DataTables?
About the e-mail for updates, I put up my hand :-) because I don't use RSS feed.
Well, good luck with the project and till next time
Greetings,
Wim
I'll look at putting together an e-mail script which will match the RSS feed when I've got 1.5 out.
Regards,
Allan