Disable inline editing on second column

Disable inline editing on second column

bpernikoffbpernikoff Posts: 4Questions: 1Answers: 0

Is it possible to disable inline editing on other columns besides the first one (:first-child)?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,301Questions: 26Answers: 4,946
    Answer ✓

    This example shows one way to control which columns are inline editable:
    https://editor.datatables.net/examples/inline-editing/columns.html

    If you prefer the jQuery selectors you can do something like this:
    $('#myTable').on( 'click', 'tbody td:not(:first-child, :nth-child(2))', function (e) {

    Kevin

  • bpernikoffbpernikoff Posts: 4Questions: 1Answers: 0

    Thanks! This syntax: :not(:first-child, :nth-child(2)) was exactly what I was looking for. The example provided using className also worked!

This discussion has been closed.