cancel
Showing results for 
Search instead for 
Did you mean: 

Show total sum in SAPUI5 Table

Former Member

Hi,

I want to show the total of a column as a final row of the table.

Need help in achieving it.

Below is a mock up of what I am looking for.

        

Right now the only thing I can think of is table footer text. But Is aligning the same with a particular column is possible (without using padding/spacing /margin) ?

Regards,

Raj

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi all,

Found the solution.

For each/one column we can set a footer.

new sap.m.Column({ // second column

  hAlign : "Right", // column will be right aligned

  header : new sap.m.Label({ // header of the second column

  text : "Price"

  }),

   footer : new sap.m.Label({ // footer of the second column

  text : "15.00 EUR"

  })

  })

 

this solves my issue.

0 Kudos

Hi Rajkishore,

In your example, how does it calculate the total amount? Is it down by the table control itself or by your own calculation?

Regards,

Yang

Former Member
0 Kudos

Hi Yang,

Here we do the calculation of the sum in backend and show it in footer.

Regards,

Raj

0 Kudos

Ok, got it. thank you, Raj!

Answers (0)