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: 9Questions: 5Answers: 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: 17,264Questions: 25Answers: 4,098
    Answer ✓

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

    Kevin

  • bonaventurebonaventure Posts: 9Questions: 5Answers: 0

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

    did the job, thanks a lot!

  • bonaventurebonaventure Posts: 9Questions: 5Answers: 0
    edited February 9

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

  • colincolin Posts: 14,531Questions: 1Answers: 2,484

    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.