Skip to Content
0
Former Member
Apr 02, 2014 at 12:47 PM

How to concat values and bind it in the table ?

2459 Views

Hi All,

I am new to SAP UI5 development. I am having a "Firstname" and "Lastname" that should be concat and display in the same column. Can anyone please tell me how to acheive this.

find the code below and gimme an idea of how to concat?

var oControl;

oTable = new sap.ui.table.Table("tblMembers", {

editable: false,

visibleRowCount: 10,

selectionMode: sap.ui.table.SelectionMode.Single

});

oControl = new sap.ui.commons.TextField().bindProperty("value","FIRST_NAME");

oTable.addColumn(new sap.ui.table.Column({label:new sap.ui.commons.Label({text: "First Name"}), template: oControl, sortProperty: "FIRST_NAME", filterProperty: "FIRST_NAME", flexible: true, width: "125px" }));

oControl = new sap.ui.commons.TextField().bindProperty("value","LAST_NAME");

oTable.addColumn(new sap.ui.table.Column({label:new sap.ui.commons.Label({text: "Last Name"}), template: oControl, sortProperty: "LAST_NAME", filterProperty: "LAST_NAME", flexible: true, width: "125px" }));

Thanks in advance

Aravindh

Attachments