WordPress.org

Ready to get started?Download WordPress

Forums

TablePress
[resolved] Sorting Dates And Numbers (8 posts)

  1. Neil Haslewood
    Member
    Posted 6 months ago #

    Hi Tobias

    I am wanting to sort two columns in a table. The columns in question are a date column and a number column. I tried the sorting extension but got nowhere with it as it did not work and it upset other code in the table. I decided to deactivate the extension for now.

    The table can be seen at http://www.peakandfellwalking.co.uk/peaks/my-peaks-climbed/birketts/ and the two columns I want to sort are "Climbed" and "Sequence".

    Two other extensions are also active on this table ... Pagination Length Change "All" and DataTables Column Filter.

    I hope you can help me with this problem.

    Regards
    Neil

    http://wordpress.org/plugins/tablepress/

  2. TobiasBg
    Member
    Plugin Author

    Posted 6 months ago #

    Hi Neil,

    I'm a little bit confused... The "Sequence" column is sorting fine for me? What is wrong there?

    For the "Climbed" column, please try the Sorting Plugins Extension again. What "Custom Commands" were you using for that?
    However, the problem here might be the empty cells in that column...

    Regards,
    Tobias

  3. Neil Haslewood
    Member
    Posted 6 months ago #

    Hi Tobias

    Ah yes ... the sequence column seems to be working again now. I wonder if it something to do with when I was making changes for the sorting issue.

    I will try again on the sorting with the Sorting Plugins Extension and see what happens. I presume if there are two custom commands on a table they are separated by a comma?

    Regards
    Neil

  4. TobiasBg
    Member
    Plugin Author

    Posted 6 months ago #

    Hi Neil,

    yes, for multiple "Custom Commands", just put a comma between them.

    Regards,
    Tobias

  5. Neil Haslewood
    Member
    Posted 6 months ago #

    Hi Tobias

    Ok I have activation the extension and placed some custom code in the custom commands ... "aaSorting": [[1,'desc']] ... and the result is that the column is no longer sorted and the results per page stops working and all results are shown.

    Regards
    Neil

  6. TobiasBg
    Member
    Plugin Author

    Posted 6 months ago #

    Hi Neil,

    ok, I just took a look at the page, and it seems that indeed the empty cells in that columns cause this problem :-( You will need to fill all of them with a date.

    Regards,
    Tobias

  7. Neil Haslewood
    Member
    Posted 6 months ago #

    Hi Tobias

    I have fixed it. I have taken out the records without a date (ones I have not yet climbed) and now it works.

    What I will do next is create a new table for the ones which I still have to climb and place this table under the other one on the webpage. Hopefully this should sort my problem out.

    Thank you.

    Regards
    Neil

  8. TobiasBg
    Member
    Plugin Author

    Posted 6 months ago #

    Hi Neil,

    very nice! Yes, that sounds like a great solution here :-)

    Best wishes,
    Tobias

Reply

You must log in to post.

About this Plugin

About this Topic