Can I make certain rows disabled (not selectable)?
Can I make certain rows disabled (not selectable)?
I am loading up a table from an ajax call. I make the table select-able in multi mode (using the select plugin).
I want to be able to make certain rows visible, but not select-able (there is a column which will specify which rows should be disabled). The non-selectable rows should have a different look (grayed).
I've not yet seen any way to disable selection on a row by row basis. I suspect that this could be done by setting a particular style that the select plugin would look at.
This question has an accepted answers - jump to answer
Answers
The
user-select
event can be used to cancel selection. So you would allow the selector to select all rows, but cancel the selection of the rows that you don't want the user to be able to select using that event.Allan