Skip to Content
0
Aug 27, 2013 at 10:44 AM

How to add rows to the table in SAPUI5?

7964 Views

Hi,

I want to display a table which is having both columns and rows as headers.

I can add the columns by using

oTable.addColumn(new sap.ui.table.Column({

label: new sap.ui.commons.Label({text: "Gender"})

}));


It's working fine.

When I want to add the Row by using


oTable.addRow(new sap.ui.table.Row({

label: new sap.ui.commons.Label({text: "Name"})

}));


It's showing error in console that

The control manages the rows aggregation. The method "addRow" cannot be used programmatically! -

But in my table I need both columns and Rows with Headers like below


Column1 Column2 Collumn3 Row1


Row2


Row3






so, Please help me to solve this issue.

Thanks&Regards

Sridevi