i want to cancel the user-select event based on a column value, so if a certain column has value x cancel the event, if its other then x continue.
the cancellation is simple, but how do i get the row/column data from within the event?
This question has an accepted answers - jump to answer
The fourth parameter to user-select is cell, you can use this in the API, either as a cell, i.e. cell.data(), or to get the row, i.e. row(cell.node()) - see example here.
user-select
cell
cell.data()
row(cell.node()
Colin
The row() can use a td as a row-selector. The user-select event returns the cell() API instance of the clicked cell. So you can use cell().node() to get the td and pass that as the row selector. Confused here is an example: http://live.datatables.net/riraqojo/1/edit
row()
td
row-selector
cell()
cell().node()
Kevin
It looks like you're new here. If you want to get involved, click one of these buttons!
Answers
The fourth parameter to
user-select
iscell
, you can use this in the API, either as a cell, i.e.cell.data()
, or to get the row, i.e.row(cell.node()
) - see example here.Colin
The
row()
can use atd
as arow-selector
. Theuser-select
event returns thecell()
API instance of the clicked cell. So you can usecell().node()
to get thetd
and pass that as the row selector. Confused here is an example:http://live.datatables.net/riraqojo/1/edit
Kevin