Use PreRendered DOM Elements instead of sDOM

Use PreRendered DOM Elements instead of sDOM

billpullbillpull Posts: 11Questions: 0Answers: 0
edited January 2013 in Blog
Is there a way to not inject the table controls via sDom but instead write those in my html and attach events to
perform their functions or populate them.

Basically would like to have the search input, the results per page, and the pagination. Anyone have an idea of
how to do this without creating DOM elements on dataTables init

Replies

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin
    Yes - use the API methods such as fnFilter and fnPageChange . Set sDom to just display the table ( `t` ).

    Allan
  • billpullbillpull Posts: 11Questions: 0Answers: 0
    Is there a method to return the number of pages available
  • billpullbillpull Posts: 11Questions: 0Answers: 0
    This is what I have working so far the text input filtering and setting the start display length cannot modify it though

    http://live.datatables.net/akanin/4/edit
  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin
    These plug-in should do the business:
    http://datatables.net/plug-ins/api#fnLengthChange
    http://datatables.net/plug-ins/api#fnPagingInfo

    There isn't yet a built in API for those options - there will be in 1.10 :-)

    Allan
This discussion has been closed.