Can we exclude multiple columns with select selector ?

Can we exclude multiple columns with select selector ?

lowrymellowrymel Posts: 20Questions: 4Answers: 0

Hi All,

I am using parent/child logic based on the blog 'Parent / child editing in child rows'.
Everything is working great.

Now I want add one or more additional controls. My thoughts are that I need to exclude the additional columns the same way that Allan did the single column in the example.

select: {
style: "single",
selector: "td:not(:first-child)"
}

Does anyone have suggestions on how best to do that? I have not found a way to pass multiple exclusion conditions to selector.

Thanks in Advance!

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,141Questions: 26Answers: 4,735
    edited March 2019 Answer ✓

    You can do something like this:

    td:not(:first-child, :nth-child(2), :nth-child(6), :nth-child(8), :nth-child(10), :nth-child(11))
    

    Note the nth-child() counting starts at `1 not 0.

    Kevin

  • lowrymellowrymel Posts: 20Questions: 4Answers: 0

    Kevin, thanks very much. That did the trick!

This discussion has been closed.