on 02-26-2009 10:07 AM
hi experts ,
i am working on a table and on an action of button i need to add a row. The table has a lots of elements like input fields, dropdown by key, textviews etc. i have created a new row by incresing visible row count on action but the above mentioned elements are not editable . The cardinality of the node bound to table is 1..n and selection is 1....n.
Please suggest me a proper solution.
Thank you.
Hi,
try this code,
here "<name>Table" is the node , which is dataSource to Table UI.
IPrivate<name>View.I<name>TableNode i<name>TableNode = wdContext.node<name>Table();
IPrivate<name>View.I<name>TableElement i<name>TableElement = i<name>TableNode.createi<name>TableElement();
i<name>TableElement.set<Attribute>(<value>); // if you want to set default values to attributes
i<name>TableNode.addElement(i<name>TableElement);
Regards,
ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks ramesh
its done.........
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this code,
IPrivatePopUpMenuView.IProductsElement ele=wdContext.createProductsElement();
ele.setProductId(str1);
ele.setQuantity(str2);
ele.setPrice(str3);
ele.setName(str4);
ele.setDetails("Detailed discription for "+str4);
wdContext.nodeProducts().addElement(ele);
Here str1 str2 are all the value which unwant to add to table.
Regards,
H.V.Swathi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should create new element for the node and add it. This should happen in onActionClick of your button. Use the lines mentioned in above post to create and add element for the new row.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
try this code , i hope cardinality for the table node should be 0..n and selection as 1..n
IPriavte<nodename>.IContextelementName abdc = wdcontext.node<Nodename>.createNodeElement();
wdcotext.node<Node> .addelement(abdc);
try this hope should work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
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.