Drop Down filter

Drop Down filter

n00b77n00b77 Posts: 6Questions: 0Answers: 0
edited November 2011 in General
Sorry if this has already been done or answered but I couldn't find exactly what I am trying to do.

I would like to add a select list to the DOM on the left while pagination is on the right. That is easy from what it looks like. Now I would like this list to contain data from my database that is related to the table rows. For example, the list could be manufactures while the data in the table is make and models, so if you want to narrow down your search select a manufacture then can string search also. I just don't know how to approach this. I would like the list to be dynamic in case there are some added or deleted. So would I use the ajax aoData that first loaded the table to contain this info or a seperate request to build this list then how do I build it and place it.

Thanks

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Do you mean something like this: http://datatables.net/release-datatables/examples/api/multi_filter_select.html ?

    Allan
  • n00b77n00b77 Posts: 6Questions: 0Answers: 0
    I did see that example already but that is not really what I am looking for. The select won't have data from any columns, it will be categories per se that the data is from. I am trying to figure out which is the best way to get the data into the select from the database and it is not displayed as a column, then place it instead of the length select. I understand I will use the fnFilter to reload data but that is as far as I got. I was thinking a separate ajax call when first drawn since it doesn't need to be queried every time the table is updated with filtered data. Just don't know where to start.

    Thanks
This discussion has been closed.