Server-Side Processing

Server-Side Processing

izzy6150izzy6150 Posts: 49Questions: 0Answers: 0
edited October 2009 in General
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

Replies

  • izzy6150izzy6150 Posts: 49Questions: 0Answers: 0
    Hi Again,

    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
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Hi 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
  • izzy6150izzy6150 Posts: 49Questions: 0Answers: 0
    Hi allan,

    That is brilliant, i will rename mine here so when i upgrade i dont have too much work to change everything.

    Regards,
    Izzy
This discussion has been closed.