cancel
Showing results for 
Search instead for 
Did you mean: 

How to change header text of table group ?

Former Member
0 Kudos

Hi guys I use table group below

How to insert manual text marked location in the picture ?

JsFiddle

Thanks for help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi,

1. Your JSFiddle uses a Table, but your screenshot looks like a TreeTable.. can you update the fiddle?

2. What exactly do you mean by 'manual text'? What text are you trying to show? Is this text fixed? Is it part of the data in the model?

Regards,

Pritin

Former Member
0 Kudos

Thanks for reply.

1) My JSFiddle is correct you can click column header then select group.

2) Yes my text is data in the model. for example the sum of the amounts etc.

Former Member
0 Kudos

Oh sorry, my bad - your fiddle is correct!

As for your question, I did a bit of digging into the standard implementation of the sap.ui.table.Table control, and it seems like there is no way to adjust this text. While rendering group headers, the following method is used to get the text and there doesn't seem to be any way to override this.

getTitle: function(iIndex) {

     var oContext = aContexts[iIndex];

     return oContext && !(oContext instanceof sap.ui.model.Context) && (oContext["name"] + " - " +      oContext["count"]);

},

Also worth noting, is that grouping in sap.ui.table.Table is marked as experimental - API/behaviour can change in future releases.

Regards,

Pritin

Answers (1)

Answers (1)

Former Member
0 Kudos

Any help?