on 10-06-2008 7:04 AM
Hi all,
I have created a value node which contains six elements in context of custom controller,
I wand to add data in this node without overwriting the previously added data., as i am binding this node to a table in view.How do i do this?
hi!
you can use WDCopyService.copyElements method to add in the value node.
thanks
vishal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
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>(<here set the value>);
........
i<name>TableNode.addElement(i<name>TableElement);
i<name>TableNode.moveNext();
you can write the above code in add button to populate the record.
Regards,
ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
wdContext.nodeName.createElement();
it will return u element reference.
By using this reference u will set values
Finally
wdContext.nodeName.addElement();
in this way u will add element
Regards
Ruturaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
do u want add an other value attribute in the value node or in the caontext?
if so,
open the data modeller,
double click on the data link between the custom controller and the view,
the in the context of the custom controller right click on the value node in which u want to create the value attribute and create a new value attribute.
Regards,
Satya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
Depending on number of rows you want to populate the data you need to create element for each row and using that element you have to populate the data to the corresponding row and bind the created elements to the node.
For example if you want to add one row of data and you have two elements in the Valuenode(name,number).
//create element for each row
wdContext.<nodename>.createElement();
//populate the data into the row (node) using the element created above.
<elementname>.Setname()="xxx";
<elementname>.Setnumber()=xx;
//bind the created element to the node.
<nodename>.addElement();
Regards
sowmya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can just try this code in a for loop
for(int i=0;i<wdContext.NodeABC().size();i++)
{
IPrivateExcelviw.IAbcElement ele = wdContext.createAbcElement();
ele.setNo(wdContext.currentAbcElement().getNo());
ele.setName(wdContext.currentAbcElement().getName());
ele.setMarks(wdContext.currentAbcElement().getMarks());
wdContext.nodeABC().addElement(ele);
}
Revert me if you have any doubts
Regards
Raghu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
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.