Bug with global search bar after clearing table and readding data via fnAddData

Bug with global search bar after clearing table and readding data via fnAddData

MetalKdiMetalKdi Posts: 2Questions: 0Answers: 0
edited November 2011 in Bug reports
I initialize a datatable with data from the server. Then when they want to filter the data, I do an AJAX call to the server and reload the grid. However, I call fnClearTable() and then proceed to add data via the fnAddData() method. When I do this, any time I enter any value in the search box, it returns no results. I can't figure out why... Any ideas? Thanks!

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    fnClearTable and fnAddData are client-side only operations. filtering, when bServerSide is true, is a server-side operation. I think the problem is you're mixing client-side and server-side operations.
  • MetalKdiMetalKdi Posts: 2Questions: 0Answers: 0
    I'm generating the HTML via C# MVC3 and stick it in a table. I then call dataTables on that table. Finally, when I "filter", I make a jQueryAJAX call to a REST service on the server side that returns the data. I then take that data and stick it back into the dataTable with fnAddData. I'm not actually doing any server side processing via DataTables plugin. I never explicity set bServerSide. I assume it defaults to false, right?
This discussion has been closed.