Toggle duplicate rows

Toggle duplicate rows

DanielSCDanielSC Posts: 19Questions: 7Answers: 1
edited March 2021 in Free community support

Hi, I was wondering if there's a way to create a button toggle that'll remove all rows that share an ID for instance.
I've found this: https://datatables.net/reference/api/unique() in the documentation but I'm unable to move forward. Any input would be highly appreciated!

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,143Questions: 1Answers: 2,586

    Yep, you can create custom Buttons, as shown in this example. It would need to call row().remove() but it should be possible.

    Colin

  • DanielSCDanielSC Posts: 19Questions: 7Answers: 1

    Thank you for your response @colin how I make it so it only removes the unique rows of the table? I'm not familiar with how to add the attribute.

  • colincolin Posts: 15,143Questions: 1Answers: 2,586
    Answer ✓

    This example may be of interest - it colours rows differently based upon whether they exist in the table. Your requirements would be similar, but you'd be removing the rows.

    Colin

This discussion has been closed.