on 01-13-2015 6:52 PM
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.
Hi Miguel,
Sure this is possible. What you need to do is use the method "addItem" of the sap.m.Table. Pass in any sap.m.ListItemBase control as a parameter.
See here for the API - OpenUI5 SDK - Demo Kit
And here is the API for sap.m.ListItemBase (choose an appropriate subclass) - OpenUI5 SDK - Demo Kit
Hope this helps!
Oli
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure, have a look at this JS Bin - JS Bin - Collaborative JavaScript Debugging</title> <link rel="alternate" type=&q...
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
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.