Mixed multiple search in multiple column!

Mixed multiple search in multiple column!

birobiro Posts: 12Questions: 7Answers: 0

Hello Everybody.

I'm making a web page with datatables like this one in the image.
in the top bar (not in the image) i've got a select which must select the record based on the data from three columns.

the "type" column is for the type of record (0 for customers, 1 for suppliers, 2 for orthers)
the "blocked" column lists if the person is blocked (0) or active (1)
the "market" column lists if the person must be in the "market"

the select that i'm using for filtering is like this

<select multiple>
        <option value="">All</option>
    <optgroup label="Customers">
        <option value=""> Customers - Active</option>
        <option value=""> Customers - Blocked</option>
        <option value=""> Customers - Market</option>
    </optgroup>
    <optgroup label="Suppliers">
        <option value=""> Suppliers - Active</option>
        <option value=""> Suppliers - Blocked</option>
    </optgroup>
    <optgroup label="Operatore">
        <option value=""> Other - Active</option>
        <option value=""> Other - Blocked</option>
    </optgroup>
</select>

What i want to do is perform a multiple selection on the select and pass the data to the search engine of datatables.

so if i clic on "customers - active" it must search in columns type (0), blocked (0), and market (0)
for "suppliers - active" is type (1), blocked (0), and market(0)
for "customers - market" is type(1), blocked(0), and market(1) and so on...

Thank You

Actually is working well with single selection, switching the value of each option,
,example

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.