Change dynamically the height of the dataTable

Change dynamically the height of the dataTable

jytestjytest Posts: 26Questions: 0Answers: 0
edited February 2013 in General
Hello,

I use DataTables with your server_processing and extra scroller.
By a javascript routine, I change the height of DataTables with this:
[code]$(".dataTables_scrollBody").height(example);[/code]

All is well. Well almost!
When I move the scroll, the table returns to its original height.
The final height is lost!
How to solve this problem?

Replies

  • jytestjytest Posts: 26Questions: 0Answers: 0
    Sure, example = "350px";
  • jytestjytest Posts: 26Questions: 0Answers: 0
    edited February 2013
    Apparently, no solution exists!
    Help me, please
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Currently there is no public API to do that. You might be able to do it by setting `fnSettings().oScroll.sY = "350px";` but I've not tried it and am not sure if it will work. If it doesn't you'll need to dig around in the code to see what exactly is happening.

    Allan
  • jytestjytest Posts: 26Questions: 0Answers: 0
    edited February 2013
    This doesn't work. Should I change the code of "jquery.dataTables.scroller.js" or "jquery.dataTables.js" ?
    What should I look for in this long code?
    my test : http://www.celinni.com/creaprint/recherche33.php (click on "critères avancés") and use the vertical-scrolling of dataTables...
  • jytestjytest Posts: 26Questions: 0Answers: 0
    Don't you have one track?
This discussion has been closed.