individual column filtering: suggested enhancement

individual column filtering: suggested enhancement

MithrusMithrus Posts: 19Questions: 0Answers: 0
edited February 2010 in General
I'm not 100% sure if this is correct, but by adding after this section of code:[code]aoData.push( { "name": "sSearch_"+i, "value": oSettings.aoPreSearchCols[i].sSearch } );
aoData.push( { "name": "bEscapeRegex_"+i, "value": oSettings.aoPreSearchCols[i].bEscapeRegex } );
aoData.push( { "name": "bSearchable_"+i, "value": oSettings.aoColumns[i].bSearchable } );[/code]add this:[code]tmpsName = oSettings.aoColumns[i].sName;
if (typeof(tmpsName)!='undefined') {
aoData.push( { "name": "sSearch_"+tmpsName, "value": oSettings.aoPreSearchCols[i].sSearch } );
aoData.push( { "name": "bEscapeRegex_"+tmpsName, "value": oSettings.aoPreSearchCols[i].bEscapeRegex } );
aoData.push( { "name": "bSearchable_"+tmpsName, "value": oSettings.aoColumns[i].bSearchable } );
}[/code]
It makes field referencing a LOT easier (at least how I do things). Mostly, I got REAL tired trying to debug my code, as somehow the indexes aren't meshing with what I expect.

Replies

  • allanallan Posts: 63,700Questions: 1Answers: 10,501 Site admin
    Hi Mithrus,

    That's a nice little enhancement. It does simply shift the burden of mapping the indexes from the client-side to the server-side, but I quite like that. I've been thinking about making use of sName a little bit more - I might come back to this, and I'm sure others will find it useful! Thanks.

    Regards,
    Allan
This discussion has been closed.