Vote count:
0
I am using a sap.ui.table to display columns of data. There are only 12 rows of data - the data is loaded from an ajax call to a database. I would like a total row at the bottom of the columns. I can't find any examples that show totals for the columns.
Here is a small snippet of my table in the XML view.
<table:Table
id="CompRecs"
visibleRowCount="12"
visible="true"
rows="{
path:'/yearInfo/'
}"
navigationMode="Paginator">
<table:toolbar>
<Toolbar>
<Label id="recText" text="Comparing " ></Label>
<Input id="startYear" width="15%" value="{/startYear}"/>
<Label id="selText" text=" to "></Label>
<Input id="endYear" width="15%" value="{/endYear}"/>
<Button text="Compare Years" press="findRecs"/>
</Toolbar>
</table:toolbar>
<table:columns>
<table:Column >
<Label text="Month" />
<table:template>
<Text text="{path: 'monthECC',formatter: 'controllers.Formatter.month'}"></Text>
</table:template>
</table:Column>
<table:Column >
<Label text="Classified Products/Components" />
<table:template>
<Text text="{classProductsA} ({classProductsB})"></Text>
</table:template>
</table:Column>
<table:Column >
<Label text="Classified Business Partners" />
<table:template>
<Text text="{classPartnersA} ({classPartnersB})"></Text>
</table:template>
</table:Column>
</table:columns>
</table:Table>
What I would like to do is to have a total at the bottom for columns such as the Classified Products and Partners....these columns are showing two values - one for the current year, and one for the previous year ('classproductsA' = year 1, 'classproductsB' = year 2).
So it should look something similar to:
Month Classified Products Classified Partners
January 3 (5) 4 (7)
February 4 (3) 5 (1)
Totals: 7 (8) 9 (8)
I haven't found any examples that I can try.
asked 30 secs ago
SAPUI5 Table total row at bottom
Aucun commentaire:
Enregistrer un commentaire