Exact value search
Exact value search
webtuts4u
Posts: 1Questions: 0Answers: 0
I am using this script to show datatable and search filter shown only one column search.
[quote] But how can i make exact value search. this code search result for 1 is 12, 123, 1234 and etc. how to fix 1 for 1 only. i am using datatables to show all my reports in my project. [/quote]
[code]
var payout = $('.select_all_dataTable').dataTable({
"sScrollY": 300,
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"aaSorting": [[ 1, "asc" ]],
"bSort": false,
"oSearch": { "bSmart": false },
"aoColumnDefs": [
{ "bSearchable": false, "aTargets": [0] },
{ "bSearchable": true, "aTargets": [1] },
{ "bSearchable": false, "aTargets": [2] },
{ "bSearchable": false, "aTargets": [3] },
{ "bSearchable": false, "aTargets": [4] },
{ "bSearchable": false, "aTargets": [5] },
{ "bSearchable": false, "aTargets": [6] },
{ "bSearchable": false, "aTargets": [7] },
{ "bSearchable": false, "aTargets": [8] },
{ "bSearchable": false, "aTargets": [9] },
{ "bSearchable": false, "aTargets": [10] },
{ "bSearchable": false, "aTargets": [11] }
],
"oLanguage" : { "sSearch" : "EPP Search: " }
});
[/code]
[quote] But how can i make exact value search. this code search result for 1 is 12, 123, 1234 and etc. how to fix 1 for 1 only. i am using datatables to show all my reports in my project. [/quote]
[code]
var payout = $('.select_all_dataTable').dataTable({
"sScrollY": 300,
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"aaSorting": [[ 1, "asc" ]],
"bSort": false,
"oSearch": { "bSmart": false },
"aoColumnDefs": [
{ "bSearchable": false, "aTargets": [0] },
{ "bSearchable": true, "aTargets": [1] },
{ "bSearchable": false, "aTargets": [2] },
{ "bSearchable": false, "aTargets": [3] },
{ "bSearchable": false, "aTargets": [4] },
{ "bSearchable": false, "aTargets": [5] },
{ "bSearchable": false, "aTargets": [6] },
{ "bSearchable": false, "aTargets": [7] },
{ "bSearchable": false, "aTargets": [8] },
{ "bSearchable": false, "aTargets": [9] },
{ "bSearchable": false, "aTargets": [10] },
{ "bSearchable": false, "aTargets": [11] }
],
"oLanguage" : { "sSearch" : "EPP Search: " }
});
[/code]
This discussion has been closed.