• Resolved gphatch

    (@gphatch)


    I am trying to do a number of things to a table using the Custom Commands line. I have combined a number of commands together and they have been working fine.

    All commands in this string work together:

    "aLengthMenu": [[10, 25, -1], [10, 25, "All"]], "sPaginationType" : "full_numbers", "aoColumnDefs": [ { "sType": "currency_sorting", "aTargets": [ "column-7" ] } ]

    All commands in this string work together:

    "aLengthMenu": [[10, 25, -1], [10, 25, "All"]], "sPaginationType" : "full_numbers", "aoColumnDefs": [ { "asSorting": ["desc", "asc" ], "aTargets": [ "_all" ] } ]

    But when I combine the two, only the second of the two aoColumnDefs commands works:

    "aLengthMenu": [[10, 25, -1], [10, 25, "All"]], "sPaginationType" : "full_numbers", "aoColumnDefs": [ { "sType": "currency_sorting", "aTargets": [ "column-7" ] } ], "aoColumnDefs": [ { "asSorting": ["desc", "asc" ], "aTargets": [ "_all" ] } ]

    If I rearrange the two aoColumnDefs commands, the same thing happens – only the second one works. So is there a special way of combining different things I am trying to do with aoColumnDefs into a single command?

    thanks!

    GPH

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

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

    (@tobiasbg)

    Hi,

    please try this:

    "aLengthMenu": [[10, 25, -1], [10, 25, "All"]], "sPaginationType" : "full_numbers", "aoColumnDefs": [ { "sType": "currency_sorting", "aTargets": [ "column-7" ] }, { "asSorting": ["desc", "asc" ], "aTargets": [ "_all" ] } ]

    With that, “aoColumnDefs” is an array of objects.

    If that also does not work, I suggest that you ask this in the DataTables forums at http://www.datatables.net, as this is actually not a question concerning WP-Table Reloaded directly, but more the DataTables JavaScript library.

    Regards,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: WP-Table Reloaded] using multiple parameters for aoColumnDefs’ is closed to new replies.