How to sort datable on style background property
How to sort datable on style background property
Dev75
Posts: 5Questions: 2Answers: 0
Hello,
I would like to sort my datable on the style background . It is possible? How ?
<td class="sorting_1" style="background: red;"></td>
<td class="sorting_1" style="background: white;"></td>
Best regards,
Sébastien
This discussion has been closed.
Answers
Hi @Dev75 ,
You can use orthogonal data with
columns.render
to return the colour for thesort
type - this will have that effect.Cheers,
Colin
i add a attribute data-order and i would like to filter on it :
My dataTable has 5 columns and i want to filter on the five : "aoColumns": [ {}, {}, {}, {}, {targets: 0, "data": { _: "0.display", sort: "0.@data-order", type: "0.@data-order" } } ]
I have an error message.. Any Idea?
Hi @Dev75 ,
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin