Single column searching
Single column searching
ureshpatel5
Posts: 25Questions: 0Answers: 0
Respected,
I used the * File: jquery.dataTables.min.js * Version: 1.9.4....
In my data listing tables.I put a search box that search using all columns.
I would like to implement such a thing like ,filter only fixed columns which i mention.
Can any one help ?
I try with this code but not working.I have four columns in list view.
[code]
jQuery(document).ready( function() {
jQuery('#DataTables_Table_0').dataTable( {
"bRetrieve":true,
"aoColumns": [
{ "bSearchable": false }
] } );
} );
[/code]
I used the * File: jquery.dataTables.min.js * Version: 1.9.4....
In my data listing tables.I put a search box that search using all columns.
I would like to implement such a thing like ,filter only fixed columns which i mention.
Can any one help ?
I try with this code but not working.I have four columns in list view.
[code]
jQuery(document).ready( function() {
jQuery('#DataTables_Table_0').dataTable( {
"bRetrieve":true,
"aoColumns": [
{ "bSearchable": false }
] } );
} );
[/code]
This discussion has been closed.
Replies
[code]
jQuery('#example').dataTable( {
"bRetrieve": true,
"aoColumnDefs": [
{ "bSearchable": false, "aTargets": [ 0,1,2,3 ] }
] } );
[/code]
Not working
It would also be worth reading the bRetrieve documentation if you haven't already and the table already exists (I don't know without a test case):
> Retrieve the DataTables object for the given selector. Note that if the table has already been initialised, this parameter will cause DataTables to simply return the object that has already been set up - ***it will not take account of any changes you might have made to the initialisation object passed to DataTables*** (setting this parameter to true is an acknowledgement that you understand this).
Allan
[quote] http://live.datatables.net/ategag/edit#javascript,html,live [/quote]
if i do not put bRetrive= true then this error occurs.
[code]
DataTables warning (table id = 'example'): Cannot reinitialise DataTable.
To retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy
[/code]
ok what about this solution shown in image below ? I think left matching search is the issue.what read in forum in data tables.
http://i44.tinypic.com/2vb2zcz.png
Allan
If try to modify the JS then...will be good ????