Retrieve hidden data
Retrieve hidden data
LucasJr
Posts: 7Questions: 3Answers: 1
Hi Everybody!
XXXX || YYYYY || ZZZZZZ || ACTIONS || Hidden1 || hidden2
XXXX YYYYY ZZZZZZ Update || Delete HHHH HHHH
I've a table in that format, where "Update" and "Delete" are buttons, and bring the values of datatable to a select2 field in a Bootstrap modal, this way:
var status = tableData[6];
$('#status').select2("val", status);
But I can't retrieve the hidden data...
I gloogled a lot and tried that:
var position = searchTable.fnGetPosition(this);
var status= searchTable.fnGetData(position)[6];
$("#status").select2("val", status);
But isn't work...
please, help me
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I put the last code on button onclick
row().data()
is the method to get the data for the row, including anything that is hidden. If that doesn't work, please link to a test case showing the issue.Allan
Thank you so much Allan! I was racking my brain with that.