Hi
Search Showing 1 to 10 of 15 enties not working
With the below code above things does not work properly though DataTable gets generated.
Why is it so
loadData();
$("#tblLocation").dataTable({});
**********************************
function loadData() {
$.ajax({
url: "/Location/List",
type: "GET",
contentType: "application/json;charset=utf-8",
dataType: "json",
success: function (result) {
var html = '';
$.each(result, function (key, item) {
html += '<tr>';
html += '<td>' + item.Id + '</td>';
html += '<td>' + item.Description + '</td>';
html += '<td>' + item.IsActive + '</td>';
html += '<td><a href="#" onclick="return getbyID(' + item.Id + ')">Edit</a> | <a href="#" onclick="Delele(' + item.Id + ')">Delete</a></td>';
html += '</tr>';
});
$('.tbody').html(html);
},
error: function (errormessage) {
alert(errormessage.responseText);
}
});
}
*************************************** LAYOUT File
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.7 -->
<link rel="stylesheet" href="~/components/bootstrap/dist/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="~/components/font-awesome/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="~/components/Ionicons/css/ionicons.min.css">
<!-- DataTables -->
<link rel="stylesheet" href="~/components/datatables.net-bs/css/dataTables.bootstrap.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="~/dist/css/AdminLTE.min.css">
<!-- jQuery 3 -->
<script src="~/components/jquery/dist/jquery-2.1.1.min.js"></script>
<script src="~/components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- DataTables -->
<script src="~/components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="~/components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>