DataTables individual column filtering (select menus) - show only dependent entries

DataTables individual column filtering (select menus) - show only dependent entries

alusscalussc Posts: 18Questions: 0Answers: 0
edited July 2013 in DataTables 1.9
Hello,

is datatables providing a function so that it is possible to show only entries depending on what is chosen in another menu? Concrete example: I have a multi filter select menu as shown here http://www.datatables.net/release-datatables/examples/api/multi_filter_select.html and choose "PSP" as platform and then it should only display "PSP browser" in the browser select menu.
If this is not possible with the standard datatables setup - how would you solve this?

Regards, alussc

Replies

  • alusscalussc Posts: 18Questions: 0Answers: 0
    Any ideas?
  • damaya1982damaya1982 Posts: 12Questions: 0Answers: 0
    How are you populating your datatable? JSON? Server-side processing? Hard coded? I just solved something similar, and there are a few routes you can take on this one, but it depends on how your Datatable is being populated.
  • alusscalussc Posts: 18Questions: 0Answers: 0
    Thanks for your response!
    It is a server-side processing: The data is provided by a MySQL-database, the ordering and formating is done by a PHP-script.
  • alusscalussc Posts: 18Questions: 0Answers: 0
    Could you help?
  • allanallan Posts: 63,381Questions: 1Answers: 10,449 Site admin
    If you are using server-side processing you'll need to update the select filters on every draw (using fnDrawCallback and updating your select elements based on the data you are returning from the server).

    Allan
  • alusscalussc Posts: 18Questions: 0Answers: 0
    Ok, it's a little more complicated :) : We use the column filter plugin as external filter. One oft the filters directly catches the options from a column in the datatable. The other filters are filled manually by hand (e.g. values: ['1', '2', '3']) - btw. I'm trying to feed the menue directly from the database via json.
    At the moment I'm a little unsure if it's really server-side processing. As I can see, the datatable ist filled by a MySQL-database, BUT the datatables-processing is done on client-side.

    Thanx, alussc
  • alusscalussc Posts: 18Questions: 0Answers: 0
    Anyone with concrete ideas?
This discussion has been closed.