Server-Side Processing
Server-Side Processing
Hi,
is there anyway in the server-side ajax processing to determine which fields are not search-able?
My script currently has to search all fields. however I have a generic script to do my database return for many pages, but I need to stop certain fields from being search-able on particular pages. is there anyway to add a sSearchEnabled_[index]?
Regards,
Izzy
is there anyway in the server-side ajax processing to determine which fields are not search-able?
My script currently has to search all fields. however I have a generic script to do my database return for many pages, but I need to stop certain fields from being search-able on particular pages. is there anyway to add a sSearchEnabled_[index]?
Regards,
Izzy
This discussion has been closed.
Replies
Sorted this one now too.
Have added this to my custom fnServerData function
[code]
for (var colI = 0; colI < this.aoColumns.length; colI++)
{
aoData.push( { 'name': 'sSearchEnabled_' + colI, 'value': this.aoColumns[colI].bSearchable } );
}
[/code]
Just wondering if this might be a useful default for anyone in the next awsome version of dataTables?
Regards,
Izzy
Good stuff - glad to hear you got it sorted. I fully agree - that should be in DataTables core. I'll add it in for the next version :-) (although I will be calling the parameter bSearchable_i to match the internal and external naming of DataTables.
Regards,
Allan
That is brilliant, i will rename mine here so when i upgrade i dont have too much work to change everything.
Regards,
Izzy