Select control setting the where clause or filter

Select control setting the where clause or filter

DatagaardDatagaard Posts: 68Questions: 20Answers: 3

Hi

I have a select control which has been populated with dates that are derived from data that I want to "filter" datatables data on.

So when the select option is changed. the onchange listener updates the where clause, or the filter.

I have looked at the Filtering datatables example https://datatables.net/examples/plug-ins/range_filtering.html, but not sure if this is what I should be using.

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 61,744Questions: 1Answers: 10,111 Site admin
    Answer ✓

    Perhaps this example will help?

    Allan

  • DatagaardDatagaard Posts: 68Questions: 20Answers: 3

    Thanks Allan,

    Close, but not quite what I am after. The date column is not shown in my table, so not sure whether that affects the example given.

  • allanallan Posts: 61,744Questions: 1Answers: 10,111 Site admin

    I'm not clear how not having a date column effects using a select to select unique values?

  • DatagaardDatagaard Posts: 68Questions: 20Answers: 3
    Answer ✓

    HI Allan,

    I was not sure whether the column had to exist in the table to be used in this instance.

    I have got a solution working now though.

    Thanks for your insight

This discussion has been closed.