Row selection

Row selection

goktuginal41@gmail.comgoktuginal41@gmail.com Posts: 57Questions: 22Answers: 0

Hello everyone,

I have a datatable that I can retrieve, add, edit and delete data from database. My problem is that when I click edit button(green) which locates at each rows, that row is selected (dark blue background). But, I dont want that. Do you have any idea to ignore that column(green edit button) for selection process?

This question has accepted answers - jump to:

Answers

  • kthorngrenkthorngren Posts: 20,275Questions: 26Answers: 4,765
    Answer ✓

    Use the select.selector option to designate which row elements to use for row selection.

    Kevin

  • goktuginal41@gmail.comgoktuginal41@gmail.com Posts: 57Questions: 22Answers: 0

    Kevin,

    Thank you very much for the answer

    I am able to ignore first column with that code:

    select: {
    style: 'multi',
    selector: 'td:not(:first-child)'
    }

    What if I also want to include last column?

  • kthorngrenkthorngren Posts: 20,275Questions: 26Answers: 4,765
    Answer ✓

    See the jQuery multiple selectors docs. Basically just put all the selectors inside the parenthesis separated by comma.

    Kevin

  • goktuginal41@gmail.comgoktuginal41@gmail.com Posts: 57Questions: 22Answers: 0

    Thank you! It worked well. Below code is also working:

    select: {
    style: 'multi',
    selector: 'td:not(:first-child):not(:last-child)'
    }

Sign In or Register to comment.