Skip to Content
Apr 21, 2020 at 02:53 PM

SAPUI5: How to set a Title for ColumnListItems


I do have the following Table:

    <Column text="Name" width="200px"/>
    <Column text="Number" width="200px"/>

        <Text text="{modelExample>name}"/>
        <Text text="{modelExample>number}"/>

with a Model like this:

var modelExample= {
"Model" = [
0:{"title":"First Title","name":"FirstName","number":0},
1:{"title":"First Title","name":"SecondName","number":1},
2:{"title":"Second Title","name":"ThirdName","number":2},
3:{"title":"Second Title","name":"FourthName","number":3}

Issue: It will iterate through all the entries: 0-3 and it will put out the name and also number but i want for it to also be able to put out the titles with the numbers/names which it does have.

Question: How to group the items in such a way that i puts out the title and also all the name/numbers which belong to the titles?