When table option responsive is set, how to get parent('tr')?
When table option responsive is set, how to get parent('tr')?
bconnectvision
Posts: 3Questions: 2Answers: 0
in Responsive
According to the example - In table form controls, what if the table has responsive option set to true? The scripts to select table.row() will not be working as responsive created child row(s) for the columns out of width.
Any suggestions how to support the in table control?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
This is the example should anyone else be reading this thread.
The key is in what is passed to
edit()
as the first parameter. In the example it is$(this).closest('tr')
since we know we want to edit the row that contains that element. In the case of Responsive we would need to check if the button is inside the responsive display or not before passing it on to Editor.For example you could use:
Then pass the
node
variable intoedit()
. This works because Responsive displays the hidden details in anli
tag which can be used as a selector for the rows.Allan