ScrollX (horizontal scrolling) on old version?
ScrollX (horizontal scrolling) on old version?
kneidels
Posts: 4Questions: 1Answers: 0
Hi there.
I have Datatables v1.9.1 (jquery 1.7.2) on an old system i have an and running (wary to upgrade, due to many dependencies)
and would like to use this code for containing an overly-wide table:
$('#dataresult').dataTable({
"scrollX": true
});
it doesnt seem to be working, i am getting this error
TypeError: m is undefined - jquery.dataTables.min.js:27:51
Is this supposed to work on an old version? was there a different syntax then?
Thanks
This discussion has been closed.
Answers
scrollX
is the current form of the option for Datatables 1.10. You will need to use the Datatables 1.9 form of the option which issScrollX
. This Conversion Guide shows the mapping between 1.9 and 1.10.Since Datatables 1.10 is backward compatible I would suggest giving it a try. any issues found in 1.9 is likely not going to be fixed by the developers.
Kevin
Thank you for the response :-)
I tried the
sScrollX
option, but received the same errorTypeError: m is undefined - jquery.dataTables.min.js:27:51
Would you know what they might be indicative of?
Hi @kneidels ,
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Hi @colin
thanks for the reply and the good direction to give a test setup.
here it is: http://live.datatables.net/tunulivi/1/
using the live nightly.
Thanks!
Thanks for the example, it helps a lot to understand what you are doing. The problem is that Datatables doesn't support colspan in the
tbody
. You have this:Move it into the
thead
and you should be good to go:http://live.datatables.net/yixeyahu/1/edit
Here is an example using complex headers:
https://datatables.net/examples/basic_init/complex_header.html
Kevin
got it @kthorngren - thanks very much!