Hi. I want to add the searchable mode to some columns table, but It's not working. Here is my code:
var tableM = $('#tablaPersonasAsistentes').DataTable({
"bFilter": true,
"serverSide": true,
"processing": false,
"sPaginationType": "full_numbers",
"sAjaxSource": "@Url.Action("LoadTables", "Inscripto")",
"fnServerParams": function (aoData) {
aoData.push({ "name": "evento", "value": @ViewBag.Evento });
},
"destroy": true,
"order": [[2, "desc"]],
"aoColumns": [
{ "mData": "Persona.Nombre", "bSearchable": false, "bSortable": false },
{ "mData": "Persona.Apellido", "bSearchable": false, "bSortable": false },
{ "mData": "Persona.Email", "bSearchable": true, "bSortable": false },
{ "mData": "Persona.Celular", "bSearchable": false, "bSortable": false },
{ "mData": "Empresa", "bSearchable": true, "bSortable": false },
{ "mData": "Tipo", "bSearchable": false, "bSortable": false }
],
"aoColumnDefs": [{
"aTargets": [6],
"mRender": function (data, type, full) {
return '<a href="#" class="btn btn-primary ImprimirTicket" data-id="' + full.Persona.Id + "-" + "@ViewBag.Evento" + '" data-codigo="">Imprimir</a>'
}
},
{
"aTargets": [7],
"mRender": function (data, type, full) {
return '<a href="#" class="btn btn-primary EnviarCertificado" data-id="' + full.Persona.Id + '" data-evento="' + @ViewBag.Evento + '">Enviar Certificado</a>'
}
}
],
"fnPreDrawCallback": function () {
// gather info to compose a message
$('#loading').show();
return true;
},
"fnDrawCallback": function () {
// in case your overlay needs to be put away automatically you can put it here
$('#loading').hide();
}
});
I don´t have a URL with the current code. Sorry for my english, I'm not a native speaker.