show value of cell [object] [Object] error

show value of cell [object] [Object] error

bilusesbiluses Posts: 26Questions: 10Answers: 0
edited July 2017 in Free community support

i want to show with an alert or console.log any value of the row cells, but i get a [object][Object] error value

editor.on('submitSuccess', function(e, json, data) {
var modifier = editor.modifier();
var currentRow = table.row(modifier).node();
if (data.incomes.status == 2 || data.incomes.status == 3 || data.incomes.status == 4 || data.incomes.status == 5 || data.incomes.status == 5) {
//here i het the error, need to display that td value
console.log($('td', currentRow).eq(11).data());
} else {
$('td', currentRow).eq(11).css('background-color', 'rgb(255, 128, 128)');
}
});

How can i display the value of that current row, where is my error?
thanks!

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,893Questions: 1Answers: 10,531 Site admin
    Answer ✓

    I think you mean to use:

    $('td', currentRow).eq(11).text()
    

    Allan

  • bilusesbiluses Posts: 26Questions: 10Answers: 0

    That was right Allan. Thank you so much

This discussion has been closed.