my DataTable.js not applying order or icons
my DataTable.js not applying order or icons
My DataTable.js:
$(document).ready(function () {
MakeDataTable();
});
function MakeDataTable() {
$('#tableMatriculados').DataTable(
{
"language": {
"lengthMenu": "Mostrar MENU registros por página",
"zeroRecords": "No se encontraros registros",
"info": "Mostrando página PAGE de PAGES",
"infoEmpty": "No se encontraros registros",
"infoFiltered": "(filtrados de MAX registros)",
"search": "Buscar en los resultados:",
"paginate": {
"previous": "Anterior",
"next": "Siguiente"
}
},
"order": [[1, "asc"]],
"responsive": "true",
"pageLength": 50
}
);
$('#tableRComprobantes').DataTable(
{
buttons: [
'copyHtml5',
'excelHtml5',
'csvHtml5',
'pdfHtml5',
{
extend: 'print',
message: 'DO NOT DISTRIBUTE'
},
],
"pagingType": "full_numbers",
"pageLength": 25,
"lengthChange": true,
"searching": true,
"ordering": true,
"order": [[ 1, "asc" ], [ 3, "asc" ]],
"info": true,
"autoWidth": true
}
);
}
function hideOverlay() {
var overlay = document.getElementsByClassName("overlay")[0];
var tableResults = document.getElementById("tableResults");
var overlayText = document.getElementsByClassName("overlay-text")[0];
tableResults.style.display = "block";
overlay.style.display = "none";
overlayText.style.display = "none";
}
function showOverlay() {
//Deshabilito la grilla
var overlay = document.getElementsByClassName("overlay")[0];
var tableResults = document.getElementById("tableResults");
var overlayText = document.getElementsByClassName("overlay-text")[0];
tableResults.style.display = "none";
overlay.style.display = "block";
overlayText.style.display = "flex";
}
From where i call:
@model WebLitoralGas.Models.ReimpresionBoletasModel
@using ClientDependency.Core.Mvc;
@{
Html.RequiresCss("~/css/rboletas.css", 33);
Html.RequiresCss(@"https://cdn.datatables.net/v/bs4/dt-1.10.18/b-1.5.6/b-html5-1.5.6/r-2.2.2/datatables.min.css", 34);
Html.RequiresJs(@"https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js", 30);
Html.RequiresJs(@"https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js", 31);
Html.RequiresJs(@"https://cdn.datatables.net/v/bs4/dt-1.10.18/b-1.5.6/b-html5-1.5.6/r-2.2.2/datatables.min.js", 32);
Html.RequiresJs("~/scripts/DataTable.js", 35);
Html.RequiresJs(@"http://ajax.aspnetcdn.com/ajax/jquery.validate/1.15.1/jquery.validate.js", 34);
Html.RequiresJs(@"http://ajax.aspnetcdn.com/ajax/mvc/5.2.3/jquery.validate.unobtrusive.js", 35);
Html.RequiresJs(@"https://cdn.jsdelivr.net/jquery.ajax.unobtrusive/3.2.4/jquery.unobtrusive-ajax.min.js", 36);
}
@Html.Raw(Html.RenderCssHere())
@Html.Raw(Html.RenderJsHere())
Titular: @Model.Titular
Domicilio: @Model.Direccion
}
Answers
Hi @CarlaBongiovan ,
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin