Help me
Help me
lesterdiaz17
Posts: 2Questions: 2Answers: 0
I WOULD LIKE TO KNOW HOW TO GET THE IDUnidadMeasure AFTER I HAVE SELECTED A ROW IN MY DATATABLE. THIS IS MY CODE WHAT IS WHAT MAKES ME MISSING?
var dataTable;
$(document).ready(function () {
dataTable = $("#UMTable").DataTable({
"ajax": {
"url": "/MeasuredUnits/GetMeasured",
"type": "GET",
"datatype": "json"
},
"columns": [
{
"data": "IDUnidadMedida",
"className": "text-center",
},
{
"data": "Descripcion",
"className": "text-center text-uppercase"
}
],
"select": {
"style": 'single'
}
});
dataTable.ajax.reload();
});
This discussion has been closed.
Answers
This Select Extension example shows how to get the selected rows:
https://datatables.net/extensions/select/examples/api/get.html
Kevin