search by field value and duplicate field names in a table
search by field value and duplicate field names in a table

Hi,
I have a question regarding field value to be used for search, and field value to be used for display.
I need to have a table with a field rendered with its value in a string, but I also need to do some filter / searches with its value.
I solved this using the same field but with display false , thats the field I use for search, and another one with the render to convert the displayed value. It is this correct?
{ data: "type_id" , display:false },
{ data: "type_id" , title: "Status" ,
render: function ( data, type, row, meta ) {
if (data==1) return 'Active';
if (data==2) return 'Processed';
return 'other value ';
}
},
thanks!
This discussion has been closed.
Answers
What works is correct, I guess
Thanks for sharing!