bonjour
j'utilse visual studio.net MVC 5
je veux afficher des données a partir de la base de données sqlserver dans datatable ,pour une quantite de données moyennes ca fonctionne bien
les fonctions ci dessous :
get_allStatEntite recupere les données
fillStatPosteDataTable affiche le resultat
function get_allStatEntite(StatCode) {
var apiurl = "http://localhost:14405/api/EntiteApi?StatEntite=" + StatCode;
$.ajax({
url: apiurl,
type: 'GET',
dataType: 'json',
success: function (d) {
AllStatPoste = d;
fillStatPosteDataTable(AllStatPoste);
},
error: function () {
alert("Error please try again");
}
});
}
function fillStatPosteDataTable(AllStatPostes) {
var table = $('#StatPosteTable').DataTable();
var rows = table
.rows()
.remove()
.draw();
AllStatPostes.forEach(AllStatPoste => {
var rowId = "crow_" + AllStatPoste.codePoste;
var row = table.row.add([
"<strong>" + today + "</strong>",
"<strong>" + AllStatPoste.codePoste + "</strong>",
"<strong>" + AllStatPoste.intitule + ': ' + AllStatPoste.employe + "</strong>",
"<strong>" + AllStatPoste.numeroAppele + "</strong>",
"<strong>" + durree + "</strong>",
"<strong>" + AllStatPoste.sonnerie + "</strong>",
"<strong>" + AllStatPoste.cout + "</strong>",
"<strong>" + AllStatPoste.sda + "</strong>"
//action
]);
//row.node().id = rowId;
table.draw();
});
}
Ce que je veux
si c'est possible je veux l'affichage des quantites volumineuses de données, merci
Ce que j'obtiens
ca se bloque et le resultat ne s'affiche pas