Datatable filter function doesn't working properly.

Datatable filter function doesn't working properly.

vijaynailbitervijaynailbiter Posts: 6Questions: 3Answers: 0

Hello,

I made one filter page like flipkart etc.. and given two filter option using select box
1) Less than (<=)
2 Greater Than (>=)

On change of select box, i called data table ajax..

it's working fine with greater than even data table search functionality.. but when i am using <= sign then i got the listing properly but when i m trying to search in this list then doesn't getting any data.. but the data is already there.

can you guys let me know what is the issue ?

Thanks

Answers

  • ThomDThomD Posts: 334Questions: 11Answers: 43

    Without an example, I'm not sure I understand exactly what you trying to do.

    If you are trying to filter on a range of values, check out the example page for that plug in.

    https://www.datatables.net/examples/plug-ins/range_filtering.html

    If you are trying to filter on an OR condition, I don't think DT does that.

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin

    It does, but you either need to use a custom filtering plug-in or a regular expression.

    Allan

  • vijaynailbitervijaynailbiter Posts: 6Questions: 3Answers: 0
    edited August 2015

    getting issue with binding parameter. I am using Laravel.

    Binding Parameter

    [0] = 1

    [1] = active

    [2] = male

    Query should be

    select * from table where status = 1 And type='active' and gender = 'male'

    While i am searching then binding parameter should be change and it will affect on my laravel data-table sequence.

    [0] = 1

    [1] = active

    [2] = 'any keyword'

    [2] = male

    Query Should be like this:

    select * from table where status = 1 And type='active' and gender = 'any keyword' and (name = 'male')

    it's change the sequence.

    Can you guys let me know how can we manage sequence of binding ?

    Thanks

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin

    Not for Laravel - if you have a Laravel question I would suggest asking in a Laravel support forum.

    Allan

This discussion has been closed.