Skip to Content
0
Former Member
Jun 20, 2015 at 04:37 PM

how to develop sap.m.Table dynamically?

995 Views

Hi all,

i am devloping a sapui5 application in that i am developing a dynamic table i am using following code for that

var oModel23 = new sap.ui.model.json.JSONModel();

oModel23.setData({

columns : aColumnData,

rows : aData

});

var oTable = sap.ui.getCore().byId('__xmlview4--Maintenanclevel');

oTable.setModel(oModel23);

// oTable.setEditable();

oTable.bindColumns("/columns", function(sId, oContext) {

var sColumnId = oContext.getObject().FIELDNAME;

var sColumnname = oContext.getObject().SCRTEXT_M;

return new sap.ui.table.Column({

id : sColumnId,

label: sColumnname,

template: sColumnId,

sortProperty: sColumnId,

filterProperty: sColumnId

});

});

oTable.bindRows("/rows");

but i want sap.m.table i mean this is an normal table


so how can i develop sap.m.Table dynamically like as above

Attachments

table.png (14.0 kB)