How do I right justify the total in a list page within phpmaker (11.0.5) so that it is displayed under the numbers that appear above it? Currently it left justified.
Right justify Totals
-
- User
- Posts: 11768
Simply put the following PHP code in "Row_Rendered" server event:
// assume your field name is "Quantity" (adjust it with yours)
if ($this->RowType == EW_ROWTYPE_AGGREGATE) {
$this->Quantity->ViewValue = "<div style='text-align: right; font-weight: bold;'>".$this->Quantity->ViewValue."</div>";
}
If you would like also to hide the "TOTAL" text in that row, then simply put the following jQuery code in "Startup Script" under "Client Scripts" -> "Table-Specific" -> "List Page":
$(document).ready(function() {
$(".ewAggregate").hide();
});
-
- User
- Posts: 9430
Instead of using server event, you can also use Startup Script and jQuery to select the TD with aggregate ( see http://api.jquery.com/has-selector/) and add your "text-align" CSS style, e.g.
$("td:has(.ewAggregate)").css("text-align", "right");