Forums

WP-Table Reloaded
[resolved] [ask] Data type for the certain column (4 posts)

  1. Masino Sinaga
    Member
    Posted 8 months ago #

    Hi Tobias,

    Could you please to help me how to define the data type for the certain column so it will support for the truly sorting feature.

    Let's say for the fourth column in my table, I want to define the data in this column as numeric, so when user click on the table heading for that fourth column, all data will be sorted properly.

    Currently, all data is detected as string, so when we sort that fourth column, the order will be like this:
    "1 - 11 - 2 - 22 - 3 - 33"

    instead of
    "1 - 2 - 3 - 11 - 22 - 33".

    Thanks before.

    http://wordpress.org/extend/plugins/wp-table-reloaded/

  2. TobiasBg
    Member
    Posted 8 months ago #

    Hi,

    that's weird, because by default the DataTables library will automatically detect the data type of a column.
    So, instead of trying to force the type, maybe we should try to find out, why DataTables does not detect it correctly.

    Can you therefore please post the URL to the page with your table?

    Regards,
    Tobias

  3. Masino Sinaga
    Member
    Posted 8 months ago #

    Never mind. I have found the answer by myself. Will write the article regarding it on my blog and post it to you.

  4. Masino Sinaga
    Member
    Posted 8 months ago #

    Here is the link you ask for it:
    http://www.ikalima.com/reuni/fundraising-ikalima-di-sarimande-jakarta-17-september-2011/

    Currently, I have not implemented the solution I found. You can see the existing condition, the data type in the fourth column is text instead of numeric or money.

Reply

You must log in to post.

About this Plugin

About this Topic