Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How can I to add manually a row without binding?

Hi, I'm trying to add a row manually to a sap.m.table without success

I have been seeing it is posible in sap.ui but not in sap.m:

var row = new sap.ui.table.Row("row1",{

                     label : new sap.ui.commons.Label("l1",{

                                  text: "Row1"

                           })

              });

                     oTable.addRow(row);

I have to verify if in my json rest field date is empty, then I have to put an input date, else then I have to put a label text.

How can I to do this requirement with sap.m.table?

Thanks in advance.

Tags:
Former Member
replied

Sure, have a look at this JS Bin - JS Bin - Collaborative JavaScript Debugging</title> <link rel="alternate" type="application/jso…

Note that it is not assembled with best practice, needs a proper MVC structure but it will show you the basics of putting a row in the table.

The XML is shamelessly copied from the samples and cut down - OpenUI5 Explored

Hope this helps,

Oli

1 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question