Skip to Content
0
Feb 01, 2016 at 04:14 PM

sap.m.table

33 Views

Hello i have to create a table where we merge the duplicate keys in the first column.

The code is as follows.

I only let one column the one i merge over in it.

The problem is as result i get:

Role

26

26

26

26

24

24

24

23

23

22

22

21

Had expected to get

26

.

.

24.

.

23

.

22

21

Can anyone give me an advice what is wrong with the following code?

Best regards.

Dirk

var o_Items = new sap.m.Table(

{

mode : "SingleSelectMaster",

columns : [

// Role

new sap.m.Column({ width : "5em" ,mergeDuplicates: true } ),

],

items : {

path : "/GetCustomerById/Contacts/",

sorter: new sap.ui.model.Sorter("RoleId",true),

template : new sap.m.ColumnListItem(

{

cells : [ new sap.m.Input(

{ type : sap.m.InputType.Text,

value : "{RoleId}",

editable : false,

}),

]

}).setModel( sap.ui.getCore().getModel("Cust_By_Id"))

}

}).setModel( sap.ui.getCore().getModel("Cust_By_Id"));