on 12-29-2015 11:20 AM
Dear Experts,
I am trying to achieve the add new blank row by pressing a ann new row button.
I have done it with the help of add item method of the table.
I need suggestion on this , can we call the table and colummn list template in my controller and do the additem and passing the template
reference to it?I have tried this but iits not working for me.
as for example :
oTable.addItem("Columnlist template") - this is not working
where as oTable .addItem(new sap.m.input etc etc) - this code works perfectly.
Since i already have a template in my view so i want to reuse it by calling in controller but however am not able to achieve this.
Kindly suggest.
regards,
Vikash
Please refer below example code.it should be useful. refer this JS Bin - Collaborative JavaScript Debugging
and Add Row in a SAPUI5 Table using xmlModel | SCN
Kindly let me know if you need any more information
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vijay,
As you mentioned the step
var modelData = oModel.getData();
this is giving the table data which is currently binded.
For me if i use this i am getting null.I dont know why? but my table is having 3 records , so it should give me values right?
Can you pease comment here.I am using the XML view.
Regards,
Vikash
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.