Adding DOM stops my fixedHeader from working

Adding DOM stops my fixedHeader from working

MichaelGibbsMichaelGibbs Posts: 10Questions: 3Answers: 0

http://live.datatables.net/jacetale/1/edit

Hi, the problem that I am having is that when I add the DOM which is commented in the link, the fixed header property stops working. What I am trying to achieve is that I want to have the "number of entries" at the top right WHILST having the fixed header property working. But the "number of entries" is stuck on the bottom right. I know that having the " dom: 'if' " would allow for the entries amount to go to the top. Is there another way around this? To have the exact same functionality that I have now but the entries amount on the top right hand corner.

Any help would be appreciated. Thanks a lot.

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,141Questions: 26Answers: 4,736

    You need to include t for the table otherwise issues like what you see occur. Does this example do what you want?
    http://live.datatables.net/jacetale/4/edit

    Kevin

  • MichaelGibbsMichaelGibbs Posts: 10Questions: 3Answers: 0

    Hi Kevin, thank for your help. But now the Search is on the bottom left. Is there a way to have both the Search AND the entries at the top?

  • kthorngrenkthorngren Posts: 20,141Questions: 26Answers: 4,736
    edited April 2021 Answer ✓

    Yes, the dom docs explain how to lay out everything. There are some good examples at the bottom of the page to help fine tune the dom layout. Change the dom option to dom: "ift", to move the search input ('f') before the table. See this example:
    http://live.datatables.net/jacetale/6/edit

    If you still need help please update the test case with what you tried so we can help with the code directly.

    Kevin

  • MichaelGibbsMichaelGibbs Posts: 10Questions: 3Answers: 0

    It worked. Thank you very much for your help.

This discussion has been closed.