Search result after column().search()

Search result after column().search()

tntnettntnet Posts: 6Questions: 1Answers: 0

Hello,
I have a data table with server side filtering. I do a custom search with "api.column(...).search(...).draw()". After filtering I would like to get those found rows.
I tried to handle the search.dt event but I always get the unfiltered data from rows().data(). Also drawCallback was not helpful.

tntnet

Replies

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Hi @tntnet ,

    I'm not following. If you do a filter with serverSide, then the client will only know about that filtered data - if has no knowledge of anything other than what's being displayed.

    Cheers,

    Colin

  • tntnettntnet Posts: 6Questions: 1Answers: 0

    Strange, it works now.
    What I tried to do is to capture the filtered result and do something with that. When accessing the data in 'search.dt' I get the previous unfiltered data. But when processing drawCallback I can access the filtered data. I don't know, what went wrong on Friday.

  • tntnettntnet Posts: 6Questions: 1Answers: 0

    Oh, still not working as I need. I would like to have some sort of draw-callback, which is called when the table was updated. Maybe my thinking is completely wrong and I need to refactor my code somehow.

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    See draw, does that fit the bill?

This discussion has been closed.