Make custom rendered col values searchable

Make custom rendered col values searchable

antoniomaxantoniomax Posts: 3Questions: 0Answers: 0
edited March 2012 in General
Hey

I'm using a function to transform an integer server returned val col into their respective strings, something like this:

'aoColumns' : [
{ 'sName': 'p.pKinds', "fnRender": function ( oObj ) {
if (oObj.aData[3]) {
// do flavor switch
return altSKinds(oObj.aData[3]);
} else {
return 'ND';
}
}, "sClass": "center valignn", "bUseRendered": false },
....


and the altSKinds function is a simple switch

function altSKinds(kind) {
switch(kind)
{
case '1':
return 'blue';
break;
case '2':
return 'yellow';
break;
case '3':
return 'red';
break;
case '4':
return 'green';
break;
case '5':
return 'grey';
break;
}
}


-----------


Is there a way to make this col rendered values searchable?
I wanna type "blue" in the search bar and list only the blue ones.

Thanks.
This discussion has been closed.