Multi Filter Select + bServerSide=true - how to show ALL data per column?

Multi Filter Select + bServerSide=true - how to show ALL data per column?

manentiamanentia Posts: 14Questions: 0Answers: 0
edited August 2011 in General
I've successfully implemented the multi-filter select code (http://www.datatables.net/release-datatables/examples/api/multi_filter_select.html) on a DataTable. The data is being pulled from the server and due to its size (13,000 rows) I switched to server side processing to speed things up.

Here's my problem, broken into two potential (but not ideal) solutions:
[code]"bServerSide" = false[/code] Pull all 13,000 rows into the table, which takes quite some time, and the multi-filter select will work as intended, grabbing all unique fields from each column.

[code]"bServerSide" = true[/code] Pull only what's being shown (@20 records, instantly accessible and responsive). The multi-filter select works, but (as intended) will only grab the unique fields that are being shown. So, though I can paginate and sort through all the records, I can only filter what's in the original view.

Is there a way to have both? Can the multi-filter selects be populated with the entire recordset's worth of data, while at the same time allowing server side processing?

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    What I would recommend is having an init-time query that pulls all the values you want for your select boxes. this would (probably) be a one-time init-only query (though if you allow editing/adding rows, you may need to update the drop down select lists).

    in short: when using bServerSide = true, all your processing has to be done on the server side, including forming these select lists, in order to get all the potential values from your database.
This discussion has been closed.