0
have my grid:
$.fn.dataTable.ext.legacy.ajax = true;
var grid = $("#gridGrupo").dataTable({
"language": {
"url": "/Scripts/Libs/DataTables/ptBr.txt"
},
"processing": true,
"serverSide": true,
"ajax": "/grupo/data",
"order": [[0, "desc"]],
"columns": [
{ "data": "Id" },
{ "data": "Nome", },
{ "data": "Descricao" }
]
});
$('#gridGrupo 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');
}
});
It arrow the class "row_selected" when it selects a line
I have my job
function Editar(){
}
I need to take the line that he selected, which has the class "row_selectd" to get the id, and if not find, send an msg
I’m not getting the ID part..