Adding a refresh button to jQuery Datatable

Adding a refresh button to jQuery Datatable

SKRSKR Posts: 13Questions: 0Answers: 0
edited July 2012 in DataTables 1.9
Hi Allan,

I have a dataTable in my application. I am required to add a Refresh button somewhere near Search textbox within the datatable in order to refresh the table when user clicks on it. I have figured out the refresh functionality. The thing that I am stuck with is how do I include this button within the datatable? I want to access this button id in my end script. Any suggestions? Also can you tell what is the use of 'bJQueryUI'?

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    edited July 2012
    Can you just use normal jQuery or DOM methods to add your button?

    [code]
    $('').click( function () {...} ).appendTo( 'div.dataTables_filter' );
    [/code]

    If that isn't enough, then you could create a DataTables plug-in for your button ( http://datatables.net/blog/Creating_feature_plug-ins ) or use TableTools (which is specifically designed for buttons).

    > Also can you tell what is the use of 'bJQueryUI'?

    Enables the jQuery UI defaults - see bJQueryUI .

    Allan
  • SKRSKR Posts: 13Questions: 0Answers: 0
    Thanks Allan...I used the normal jQuery method and it worked fine! Thanks a lot.
This discussion has been closed.