How to use the API to force the table to redraw?

How to use the API to force the table to redraw?

izumovizumov Posts: 178Questions: 14Answers: 0

I have two elements input type=date on the form. I use them to determine the period for which data is selected in the table. How do I get a table to send an Ajax request to redraw after changing the date interval?

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Hi @izumov ,

    ajax.reload() will request new data.

    Cheers,

    Colin

  • izumovizumov Posts: 178Questions: 14Answers: 0

    The overload of the table if you change the date I implemented the following code
    function ChangeDate(){
    var table=$('#orders').Datatables();
    StartDate=document.getElementById('StartDate').Value;
    EndDate=document.getElementById('EndDate').Value;
    table.ajax.reload();
    }

    Did I do everything right?

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    If it works, I'd say so... :)

This discussion has been closed.