Showing 0 to 0 of 0 entries (filtered from NaN total entries) ???

Showing 0 to 0 of 0 entries (filtered from NaN total entries) ???

reninsomereninsome Posts: 10Questions: 3Answers: 1

Showing 0 to 0 of 0 entries (filtered from NaN total entries)

there is an Issue in data table binding It shows above message even there are 5 rows in datatable
That means Css is not working on binded dataset. What to do now ??
Here is my code

$("#GV1").DataTable({
serverSide: true,
processing: true,
fixedHeader: true,
ajax: {
type: "POST",
url: '@Url.Action("GetData", "Transaction")',
data: { typ: 1 },
dataType: "json",
dataSrc: function (result) {
var json = jQuery.parseJSON(result);
return json;
}
}
,
columns: [{ data: 'Sno''},
{ data: 'M'},
{ data: 'Ct' },
{ data: 'F'},
{ data: 'CS'},
{ data: 'Q' },
{ data: 'R'},
{ data: 'A' },
]
,
dom: '<"html5buttons"B>lTfgitp',
buttons: [
{ extend: 'copy' },
{ extend: 'csv' },
{ extend: 'excel', title: 'ExampleFile' },
{ extend: 'pdf', title: 'ExampleFile' },
{
extend: 'print',
customize: function (win) {
$(win.document.body).addClass('white-bg');
$(win.document.body).css('font-size', '10px');
$(win.document.body).find('table')
.addClass('compact')
.css('font-size', 'inherit');
}
}
]
} );

..................................................................................

This question has an accepted answers - jump to answer

Answers

  • reninsomereninsome Posts: 10Questions: 3Answers: 1
    Answer ✓

    Problem Resolved
    It works when serverSide : false
    :smiley:

This discussion has been closed.