• Resolved pix582

    (@pix582)


    Hi
    i have been trying to sort out my table for over a week, looking over the posts, but cant work it out. my site i have images in the first column that i want to sort a-z. same with column 2 (going to be all images), also need to sort currency in column 3, and need to turn off sorting on column 4, 6, 7, 8.
    if any one can help thanks,
    John.

    http://ww.wp.xz.cn/extend/plugins/wp-table-reloaded/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi John,

    this is a little bit tricky actually.

    To sort the images, you will obviously need to create a text item first that can be used for sorting. My suggestion for that is to add an invisible text element at the beginning of each cell with an image, like

    <span class="invisible">32red</span>

    for the first cell for example. Additionally, you’ll need to add

    .wp-table-reloaded .invisible {
      display: none !important;
    }

    to the “Custom CSS” textarea on the “Plugin Options” screen.

    Sorting currencies is also not possible by default (as currencies are sorted differently than text or numbers). To add this feature, I suggest to install the small plugin extension http://tobias.baethge.com/download/plugins/additional/wp-table-reloaded-currency-sorting.zip as a regular WordPress plugin. Some usage instructions can be found at http://ww.wp.xz.cn/support/topic/wp-table-reloaded-sorting-currencies-not-working and http://ww.wp.xz.cn/support/topic/troubles-sorting-colums-with-currency .

    And finally turning off sorting for certain columns: This is possible by adding

    "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 3, 5, 6, 7] } ]

    to the “Custom Commands” textfield in the “DataTables JavaScript Features” section on the “Edit” screen of your table (counting in that list starts with 0, so 3, 5, 6, 7 will remove sorting from the columns that you mentioned above).

    Regards,
    Tobias

    Thread Starter pix582

    (@pix582)

    Thanks so much, but the

    “aoColumnDefs”: [ { “bSortable”: false, “aTargets”: [ 3, 5, 6, 7] } ]

    is not working. i have followed all your steps, and now i have no sorting, but i tryed the images and currencies before the last bit of code and its all working.

    Thread Starter pix582

    (@pix582)

    got it to work

    {“aoColumnDefs”: [ { “sType”: “currency_sorting”, “aTargets”: [ “column-3” ] },
    { “bSortable”: false, “aTargets”: [ 3, 5, 6, 7] }],
    “bJQueryUI”: true}

    was missing ,
    but now seem to be missing my next page button.

    Thread Starter pix582

    (@pix582)

    When i use the css on my site, the table header bg dont work, and the sorting arrows are gone.

    @importhttp://www.laybackprofit.net/wp-content/themes/simpleblue/jquery-ui-1.7.2.custom.css&#8221;;

    But if i link to datatables then it all works.

    @importhttp://www.datatables.net/media/css/jui_themes/redmond/jquery-ui-1.7.2.custom.css&#8221;;

    also cant seem to be able to set the height of row-1 (table header)

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    great that you where able to get this to work! Very nice!

    About the styling: From what I can see, just copying the CSS file is not enough, you will also need to place new sorting icons (with a special file name) in the correct location on your server. Unfortunately, I’m not an expert with that, so I can’t help with the integration of jQuery UI. Sorry.

    Regards,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘[Plugin: WP-Table Reloaded] Column Sorting Issues’ is closed to new replies.