DT 1.10 - Server side filtering

DT 1.10 - Server side filtering

deliatordeliator Posts: 95Questions: 1Answers: 0
edited August 2018 in Free community support

Hi,

I used this example with my own data : http://live.datatables.net/piqidoqo/549/edit
I got the 'processing' message but the filtering is not done.

Any help please ?

Marc

Replies

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    Did you actually write code to do the serverside filtering? when serverSide = true, filtering the dataset before returning it is not something DataTables does. It provided the needed information but your code has to use that information to do the filtering.

  • deliatordeliator Posts: 95Questions: 1Answers: 0

    Hello, thanks for the answer.

    Yes serverSide is true.
    When i make a global search, the request is send to the server that generate a new json result, i hvae just to make ajax.reload.

    In my case, i don"t know how send the request to the server.

    Marc

  • Bindrid2Bindrid2 Posts: 79Questions: 4Answers: 12

    We are going to need to see your code. If you are using the DataTable global search feature, it will used your defined ajax to send the request to the server. When DataTables "sees" the response, the table will be rebuilt automatically. If that is not happening, something is wrong with your code.

  • deliatordeliator Posts: 95Questions: 1Answers: 0
    edited August 2018

    Hello,

    This is the URL giving me the json return from the sever :

    (in this example i show only the column 0 and 1, others are hiding)

    http://myServer/dataDefinitions.cfm?draw=4&
    columns[0][data]=field1&
    columns[0][name]=&
    columns[0][searchable]=false&
    columns[0][orderable]=true&
    columns[0][search][value]=&
    columns[0][search][regex]=false&
    columns[1][data]=field2&
    columns[1][name]=&
    columns[1][searchable]=false&
    columns[1][orderable]=true&
    columns[1][search][value]=&
    columns[1][search][regex]=false&
    columns[1][search][regex]=false&
    order[0][column]=7&
    order[0][dir]=asc&
    start=0&
    length=10&
    search[value]=myString&
    search[regex]=false&
    _=1535353635754`
    

    the URL returns me a set with all the records containing the string 'myString'

    if i change

    columns[0][search][value]=& 
    

    to

    columns[0][search][value]=anotherString&
    

    it returns me the whole set, withour filtering on anotherString

    I have no error in that case.

    Marc

This discussion has been closed.