Retrieving selected dropdown value for a single row? Urgent!
Retrieving selected dropdown value for a single row? Urgent!
I have a button in each row, and two drop downs (added using columndefs).
how do retrieve the selected value in the dropdown?
For now, I'm able to get all the other data of the row except from the dropdowns using,
$('#table_id tbody').on( 'click', 'button', function () {
var data = table.row( $(this).parents('tr') ).data();
alert(data);
});
If i try to access the dropdown values using,
var data = table.$('select').serialize();
it serializes all the data from all the dropdowns in the table. I need the data only from the row in which the button is clicked.