get value of specific column in selected row
get value of specific column in selected row
hello, i am selecting row in my table this way.
how can i get the value of specific column by column name (ex: Name, Desc, etc.. )
after adding "selected" class.
table.on('click', 'tr', function () {
if (window.$(this).hasClass('selected')) {
window.$(this).removeClass('selected bg-info');
AppRuntime.setlookupId(0)
} else {
table.$('tr.selected').removeClass('selected bg-info');
window.$(this).addClass('selected bg-info');
let lookupId = window.$(this).children().first().text()
AppRuntime.setlookupId(lookupId)
}
});
This question has an accepted answers - jump to answer
Answers
Use
row().data()
orrows().data()
with theselector-modifier
of the selected class. For example:Kevin