Different default sorting for a table
-
Hi!
I have a table that I wish to use twice on the same page. The table has 11 columns of which two are hidden as default. In the first appearance of the table, all columns except the hidden ones are shown. Shortcode below:
[table id=1 shortcodes_before_formulas=true plus_sign_positive_numbers="7"/]
In the second appearance of the table (below the “first one”), I have with the help of shortcode hidden some columns and put the default-hidden ones to show up. Here’s the shortcode for the second appearance:
[table id=1 print_description="false" hide_columns="4-6,8-9" show_columns="10,11" plus_sign_positive_numbers="4,5" /]
For the table, I have some Custom Commands to apply default sorting etc:
"aaSorting": [ [ 5, "desc" ], [ 3, "desc" ], [ 6, "desc" ], [ 2, "asc" ], [ 7, "asc" ], [ 0, "asc" ] ], "aoColumnDefs": [ { "asSorting": [ "desc", "asc" ], "aTargets": [ 2, 3, 4, 5, 6, 7, 8 ] } ], "bSortClasses": true
Now, is it possible in some way to assign the same table different sorting than the default one, that’s in the Custom Commands? Because, now when I show the table in the second appearance, the sorting is not working and i.e. the sorting arrows are not displayed. I assume it’s because I have hidden the columns 4-6 and 8-9…
Thanks for some advice, and I hope there is some solution for this ??
- The topic ‘Different default sorting for a table’ is closed to new replies.