How to change unfiltered rows background color instead of deteting rows

How to change unfiltered rows background color instead of deteting rows

hitachi_kawahitachi_kawa Posts: 2Questions: 1Answers: 0

I want to change background color of the rows that do not hit.
But I do NOT want to detele the rows.
Like the image below. Please help.

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583
    Answer ✓

    Hi @hitachi_kawa .

    That's not possible, I'm afraid. The searching/filtering is fundamental within DataTables, it affects the display and also internal objects - so it's wouldn't be just a case of changing the colour.

    Cheers,

    Colin

  • hitachi_kawahitachi_kawa Posts: 2Questions: 1Answers: 0

    @colin
    Thank you for your answer.
    I understand.

    hitachi_kawa

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Hi @hitachi_kawa ,

    I was thinking about this again, and decided I could get it behaving like you want! Take a look at this example.

    You need a custom search element, which does still function with the standard search, but it behaves like your screenshot!

    Hope that does the trick! Sorry for dismissing it earlier - I shouldn't reply to blog posts before the coffee hits :)

    Cheers,

    Colin

  • colincolin Posts: 15,112Questions: 1Answers: 2,583
This discussion has been closed.