Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sort Tables
02-03-2014, 02:12 AM,
#1
Sort Tables
Some reports use tables... but not all has the sort button on the head of the columns.

To do that, you need to edit the php file of the report that is not sorting and:

1st: insert the class ascending in each column, e.g.:
This is my BOMInquiry.php
Code:
                            <th class="ascending">' . _('Component') . '</th>
                            <th class="ascending">' . _('Description') . '</th>
                            <th>' . _('Quantity') . '</th>
                            <th class="ascending">' . _('Unit Cost') . '</th>
                            <th class="ascending">' . _('Total Cost') . '</th>

2nd: sometimes you need to split the table because of the totals or headers that are mixed with the table. TO split it, just insert the code:
Code:
        echo '<table class="selection">';


Hope helps you too!!!
edumarzolla
_____________________
Eduardo Marzolla
skype: edumarsola
Reply
02-03-2014, 03:41 AM,
#2
RE: Sort Tables
Hi Eduardo, what I do is to wrap the "sortable" part of the table in <tbody></tbody> tags, and then it wont sort anything outside thos tags.

Thanks
Tim
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)