Searching option only works when clicked on "show 10,25..entries" button.

Searching option only works when clicked on "show 10,25..entries" button.

jhonnydeptjhonnydept Posts: 1Questions: 1Answers: 0

I had implemented DataTable but I'm facing below problems
1) Searching option only works when clicked on "show 10,25..entries" button.
2) Previous,1,2,3.. and Next buttons which are used to view data in table are not working.
Below is my code

//links

<link rel="stylesheet" href="../../assets/vendor/datatables-bootstrap/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="../../assets/vendor/datatables-fixedheader/dataTables.fixedHeader.min.css">
<link rel="stylesheet" href="../../assets/vendor/datatables-responsive/dataTables.responsive.min.css">
<link rel="stylesheet" href="../../assets/examples/css/tables/datatable.css">

//These are my jQuery/Javascript for DataTable
//Script for implementing DataTable.

$(document).ready(function(){ $('#myTable1').DataTable(); });

//Script for filtering column data of DataTable.

$(document).ready(function() { $('input.column_filter').on( 'keyup click', function () { filterColumn( $(this).parents('tr').attr('data-column') ); } ); } ); function filterColumn ( i ) { $('#myTable1').DataTable().column( i ).search( $('#col'+i+'_filter').val(), $('#col'+i+'_regex').prop('checked'), $('#col'+i+'_smart').prop('checked') ).draw(); }

//code for table

<

div class="table-responsive box-body">

<

table class="table table-bordered table-hover toggle-circle" id="myTable1">
<thead bgcolor="#62A8EA">
<tr>
.
.
.

//scripts for DataTables













Answers

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    Hi,

    Happy to take a look at a test case showing the issue if you can provide a link to the issue.

    Thanks,
    Allan

This discussion has been closed.