add custom element to top

add custom element to top

vivendivivendi Posts: 15Questions: 1Answers: 0
edited September 2010 in General
Is it possible somehow to add a custom input field in the area where the table also haves the filter and paginate fields?? I couldn't find anything about it.

Replies

  • cdaiglecdaigle Posts: 57Questions: 0Answers: 0
    It certainly is possible. What you are looking for is the sDom option. See this page for more details http://datatables.net/usage/options#sDom and this one for an example: http://datatables.net/examples/advanced_init/dom_toolbar.html . (In the example Allan just put in text, but you can easily put other html in there).

    The idea is to use sDom to inject a div when the table is created, then access that div afterwards and place your input field inside of it.

    Hope this helps
  • vivendivivendi Posts: 15Questions: 1Answers: 0
    Great, thanks alot for your help!
This discussion has been closed.