I'm guessing you want to disable the Responsive extension to remove the blue buttons under data, correct? If so you will have something like responsive: true in your Datatables init code. There are other ways to enable it, take a look at the other options here.
Use the scrollX option to enable horizontal scrolling.
Guessing you added scrollX in a separate Datatables initialization. You need to combine it into one initialization. If this doesn't help then we will need to see what you have. Please post your Datatables Javascript code. Better is a link to your page or a test case showing the issue. https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
I tried in every possible way and failed, I realized that I am not the only one. several people complained about it and had no feedback. what I need is to create a horizontal scroll bar instead of that button
what I need is to create a horizontal scroll bar instead of that button
Here is an example with horizontal scrolling. Add the "scrollX": true to your Datatables init code and remove responsive: true.
If you still need help then you need to provide the requested information along with what is happening or errors you are getting. Without the details we won't have the information to help.
Its hard to say why without seeing what you are doing. You should be able to simply add the line scrollX: true, to your current Datatables init code. You will also need to remove the line responsive: true, assuming that is how its initialized. If you need further help then post your Datatables config along with a description of the problem. You should post your original Datatables init code so we. can see what you started with.
Answers
I'm guessing you want to disable the Responsive extension to remove the blue buttons under data, correct? If so you will have something like
responsive: true
in your Datatables init code. There are other ways to enable it, take a look at the other options here.Use the
scrollX
option to enable horizontal scrolling.Kevin
for some reason an alert is appearing
Did you follow the troubleshooting steps found at the link in the error?
https://datatables.net/manual/tech-notes/3
Guessing you added
scrollX
in a separate Datatables initialization. You need to combine it into one initialization. If this doesn't help then we will need to see what you have. Please post your Datatables Javascript code. Better is a link to your page or a test case showing the issue.https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
I tried in every possible way and failed, I realized that I am not the only one. several people complained about it and had no feedback. what I need is to create a horizontal scroll bar instead of that button
That doesn't explain what you have actually done. As you have not provided any code, we have no idea where your problem is.
Complained about what? Show us some examples, otherwise we're still in the dark.
Kevin's advice is very clear:
follows source code,
Here is an example with horizontal scrolling. Add the
"scrollX": true
to your Datatables init code and removeresponsive: true
.If you still need help then you need to provide the requested information along with what is happening or errors you are getting. Without the details we won't have the information to help.
Kevin
keeps displaying the message and it ends up hiding as options to print csv, pdf etc.
Once again:
able to show the scroll bar, but the print option is gone.
Its hard to say why without seeing what you are doing. You should be able to simply add the line
scrollX: true,
to your current Datatables init code. You will also need to remove the lineresponsive: true
, assuming that is how its initialized. If you need further help then post your Datatables config along with a description of the problem. You should post your original Datatables init code so we. can see what you started with.Kevin