non-editable columns
non-editable columns
jakebriems
Posts: 2Questions: 2Answers: 0
in DataTables
I have a data table with 20 columns. i'd like to be able to edit only the right-most 6 of them, so I did this:
$('#example').on( 'click', 'tbody td:gt(14)', function (e) {
editor.inline( this );
} );
and that works, but only on the first row. For every other row, all of the cells are editable.
ideas why?
This discussion has been closed.
Answers
Hi,
We discussed this by e-mail, but for anyone else who is looking into this as well, it is possible to achieve what you are looking for by making it a little more specific with the
nth-child()
operator:The jQuery documentation for
nth-child()
is available here: http://api.jquery.com/nth-child-selector/And there is a useful document (and I frequently use as a reference!) about
nth-child()
here: http://css-tricks.com/useful-nth-child-recipies/Regards,
Allan