Custom sorting with multiple value on one attribut

Custom sorting with multiple value on one attribut

CreissCreiss Posts: 3Questions: 1Answers: 0
edited January 22 in Free community support

hello, I'm just trying to use datatables, I've done quite a lot of searching but I still haven't been able to solve this problem. In the table that I have created, I have 1 column where that column has many values in 1 attribute,

for example:
1. active, exp: (date), print.
2. expired.
3. none.
4. suspended.

It should be a correct sort rule in ascending order, but in its implementation, the sort that appears is messy with several attributes tucked into each other.

Anyone know how to fix the problem? I also use span, does that affect the sorting?

Should i give snapshot of my table and code?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,236Questions: 1Answers: 2,597

    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.

    Colin

  • CreissCreiss Posts: 3Questions: 1Answers: 0

    is there anyway to provide my code other than using test case link? because my table retrieve data directly from database and using php

  • allanallan Posts: 62,990Questions: 1Answers: 10,367 Site admin
    Answer ✓

    The advantage of a test case is that we can see it running live, trace the code, and get a much better feel for the problem. So if it is possible to create a test case or link to your page, it would be of great help in allowing us to assist you.

    However, if that isn't possible, please show your Javascript for the DataTable, the HTML for the table, and if data is being Ajax loaded, the Ajax data as well.

    Thanks,
    Allan

  • CreissCreiss Posts: 3Questions: 1Answers: 0

    Sorry I've figured it out, thanks mr. Colin and Allan for the suggestion

Sign In or Register to comment.