Multiple values in one column and sorting through them

Multiple values in one column and sorting through them

HidiehHidieh Posts: 2Questions: 1Answers: 0
edited June 2020 in Free community support

Hi,

I have a case where I would like to show multiple values in one column called "categories". Single "row" can have 1-n categories. The user should be able to sort by categories, sorting by one category is enough - of course, making it possible to sort by multiple categories would be ideal. I have not found a previous case similar to this and have no idea where to start. Showing the data is not the problem, but making the sorting work is a problem. Is there an example case for this, how should this be handled?

Link to test case: http://live.datatables.net/dixukowa/1/

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586
    Answer ✓

    You would need to create a custom orderer for that - see other plugins here that you could use as a template.

    It would also be wise to use a multi-headered table, see example here, with the option orderCellsTop.

    Colin

  • HidiehHidieh Posts: 2Questions: 1Answers: 0

    Thank you so much! Ended up finding the perfect solution through your links.

This discussion has been closed.