sDom not flexible enough, need different sollution.

sDom not flexible enough, need different sollution.

mlmariusmlmarius Posts: 6Questions: 0Answers: 0
edited August 2012 in General
in order to render my table nicely to the page i need it to be in the following structure:

[code]

Props




Id
.......




id
.....





[/code]

Problem is that i want my paginator, length selector and filter input box outside of this construction because if it renders them inside it blows everything up.
So i try to use the following sDom:

[code]
"sDom": "<'widget widget-table'<'widget-header'><'widget-content' t>>p"
[/code]

and eliminate the other tags from the html but this brings me to another problem ... i can't specify tags and text in the sDom option because they all get parsed :(

How can i make it render the paginator and all other widgets somwehere else ? It should have a getPaginator() method so i can render it whenever i want. Can this be done ?

Replies

  • allanallan Posts: 63,538Questions: 1Answers: 10,476 Site admin
    > How can i make it render the paginator and all other widgets somwehere else ?

    Now, however you can use standard jQuery / DOM methods (append, appendChild etc) to move elements to where you want there to be.

    Allan
  • mlmariusmlmarius Posts: 6Questions: 0Answers: 0
    Thanks ! When would i use these methods ? Can i bind to some event ?
  • allanallan Posts: 63,538Questions: 1Answers: 10,476 Site admin
    Yes: fnInitComplete is the callback method - init ( http://datatables.net/docs/DataTables/1.9.3/#init ) is the event.

    Allan
This discussion has been closed.