how can I trigger jquery datatables fnServerData to update a table via AJAX when I click a button?

前端 未结 7 971
陌清茗
陌清茗 2020-12-28 17:15

I\'m using the datatables plugin with server-side data and am updating the table using AJAX.

My dataTables setup looks like this:

tblOrders = parame         


        
7条回答
  •  清酒与你
    2020-12-28 17:36

    I know this is late to the game, but fnDraw (from this answer above - which should be the accepted answer), is deprecated as of v1.10

    The new method is:

    this.api( true ).draw( true );
    

    Which, BTW, has a comment that reads:

    // Note that this isn't an exact match to the old call to _fnDraw - it takes
    // into account the new data, but can hold position.
    

提交回复
热议问题