I have my input and button
<input id="gridSearch" type="text" /> <button id="filter" class="btn btn-default">Buscar</button>
and my table
$.fn.dataTable.ext.legacy.ajax = true;
var grid = $("#gridCustomer").DataTable({
"language": {
"sProcessing": '<img src="/Scripts/loadingBgBlack.GIF" /> Loading...'
},
"bFilter": false,
"bLengthChange": false,
"processing": true,
"serverSide": true
How do I set the value to filter on the grid?
$('#filter').click(function (e) {
var searchValue = $("#gridSearch").val();
});
Why did I do this?
Why do I want to put the input in another position, and I want it to search only when you click on "Search".
Then I removed what comes standard, using "bFilter": false
and manually adding my own input with button