How can I prevent a row from being selected when clicking on dtr-control column?

How can I prevent a row from being selected when clicking on dtr-control column?

bonaventurebonaventure Posts: 15Questions: 7Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Hi Allan, I am using Responsive+Select,
configured dtr-control on column 0, have radios in column 1 with className="d-none" (bootstrap),
I set radios on selection,
and I want a row not to be selected when one clicks on the dtr-control.

thx, Stefan

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,315Questions: 26Answers: 4,948
    Answer ✓

    Use the select.selector option to control which columns are used for row selection.

    Kevin

  • bonaventurebonaventure Posts: 15Questions: 7Answers: 0

    select: {
    style: 'single',
    toggleable: false,
    selector: 'td:not(:first-child)'
    },

    did the job, thanks a lot!

  • bonaventurebonaventure Posts: 15Questions: 7Answers: 0
    edited February 2022

    but then,
    $('#mytable tbody tr').click(function () { ... }
    is not triggered any more

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

Sign In or Register to comment.