SearchBuilder and rendered cells
SearchBuilder and rendered cells
trongart
Posts: 222Questions: 51Answers: 0
According to here, SearchBuilder uses the same values as produced in the rendered cells: https://datatables.net/extensions/searchbuilder/examples/initialisation/renderedCells
Is there a way to have the cells rendered one way and SearchBuilder to use original values (not rendered differently)?
Example: live.datatables.net/woqisuxi/1/edit
This question has an accepted answers - jump to answer
Answers
Hi @trongart ,
Yes, take a look at this example. In effect, all that is to be done is to set
columns.searchBuilder.orthogonal
to'filter'
.Thanks,
Sandy
Appreciate the input, @Sandy ! This works fine on strings, but I cannot get it to work on numerical values as here: live.datatables.net/zevivula/1/edit
Age column is rendered as decimals and SearchBuilder still sees it as decimals instead of the original raw data.
Hi @trongart ,
In your render function you have to return data appropriate to the type that is passed in. Take a look at this version of your example. You can see the original example I linked does something very similar.
Thanks,
Sandy