JQuery dataTable always show all records in one page
JQuery dataTable always show all records in one page
I am using a jquery dataTable(not DataTable) in my view. I have
"paging": true,
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
in the javascript file. However, the table still shows all records in one page. I expected to see 10 records in each page.
style files:
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"/>
<link href="http://cdn.datatables.net/1.10.2/css/jquery.dataTables.min.css" rel="stylesheet"/>
and scripts:
script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script
<script src="https://cdn.datatables.net/1.10.2/js/jquery.dataTables.min.js"></script
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script
<script src="/Scripts/myscript.js" type="text/javascript"></script>
Somebody asked the similar question and one common reason was because jquery.js was rendered twice. But it seems I don't have this problem.
Can anybody give some suggestion? Thanks very much.
Answers
Happy to try and help debug it if you link to a page showing the problem.
Allan