Retrieve hidden data

Retrieve hidden data

LucasJrLucasJr 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

Answers

  • LucasJrLucasJr Posts: 7Questions: 3Answers: 1

    I put the last code on button onclick

  • allanallan Posts: 62,225Questions: 1Answers: 10,208 Site admin
    Answer ✓

    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

  • LucasJrLucasJr Posts: 7Questions: 3Answers: 1

    Thank you so much Allan! I was racking my brain with that.

This discussion has been closed.