Hi Allan,
I am using data tables for my project for the first time. It really having cool features with very minimal coding. I am coming across some probs.
Data tables filtering is not working properly, if I am filtering on columns if I am giving 2 words a sentence in the filtering it is looking for different words matching rather than the complete sentence. will it be possible to search only for the matching sentence.
Also how to ignore the filtering for particular column, I am having a img icon where it has URL for the link, if I just type a number , if number is there in the URL , its displaying back those results also.
1. Filtering - this is DataTables typing to be smart - and is a built in feature, which currently can't be disabled. What DataTables does is break the string up on space characters and then tries to match against that. The way match a single string which is unbroken, is to us a custom filter: http://datatables.net/development/filtering (look at the "Custom global filters" section). It's not ideal - but it is possible. The next version of DataTables will provide more flexibility for this.
My requirement is very simple I want all the data to be sorted by second column by default, and I dont want any sorting later, also I dont want first column to be searchable, as it has hyperlink and I am passing some Ids in the URL, it is searching those Ids also.
Can you please let me know what is wrong in the above code.
If I just remove this part
"aoColumns": [
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false }
],
It is not searching for the first column which is working fine, but I am getting sorting option for all the column names on top, which I dont need.