on 08-29-2005 4:54 PM
Hello,
I have created a table with two columns which are binded to the context. At the beginning you only see one row with these two columns.
My question is how can I realize it to add a new row? In my case I want to push a button to create a second row row with the same select boxes and so on. I think there must be an easy solution to add this row but I didn't find out it.
Regards,
Frank
Hi
Add this code to the action of the button.
IPrivate"ViewName".I"Table"Element ele = wdContext.nodeTable().createTableElement();
wdContext.nodeTable().addElement(ele);
Thanks and Regards
Leena
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Frank,
Write code of creating element and binding this element to node in your action method of the button.
refer my reply in following post for the same to add new elements.
https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode6-1&contenttype=url&content=https://
Regards,
Bhavik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Frank,
I am not very sure abt what you want, but if you just need to add a new row of data to the table :
//Create a new element of the node
Iprivate<yur_view_name>.I<Node_name>Element elmt = wdContext.create<node_name>Element();
// Set the values
elmt.set<Attribute_name>(<value>);
elmt.set<Attribute_name>(<value>);
// Add the element to the node
wdContext.node<node_name>.addElement(elmt);
Hope this helps,
Best Regards,
Nibu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Frank,
Only way to do this - add new element to context node which is mapped to datasource of table.
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.