how get data in row selected?
how get data in row selected?
roscez
Posts: 5Questions: 4Answers: 0
I'm have my grid :
$.fn.dataTable.ext.legacy.ajax = true;
var grid = $("#gridgroup").dataTable({
"language": {
"url": "/Scripts/Libs/DataTables/ptBr.txt"
},
"processing": true,
"serverSide": true,
"ajax": "/groups/data",
"order": [[0, "desc"]],
"columns": [
{ "data": "Id" },
{ "data": "Nome", },
{ "data": "Descricao" }
],
});
//select row
$('#gridgroup tbody').on('click', 'tr', function () {
if ($(this).hasClass('row_selected')) {
$(this).removeClass('row_selected');
}
else {
grid.$('tr.row_selected').removeClass('row_selected');
$(this).addClass('row_selected');
}
});
This discussion has been closed.