Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8735

How to add rows to the table in SAPUI5?

$
0
0

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


Column1Column2Collumn3
Row1


Row2


Row3






 

so, Please help me to solve this issue.

 

Thanks&Regards

Sridevi


Viewing all articles
Browse latest Browse all 8735

Trending Articles