on 06-05-2007 12:34 PM
Hi All,
I have to got two tables , where I have instantiated one table and setting the elements to null by assigning to an array. I have another table which has got the same structure which contains 100 elements, now I need to copy the same structure by instantiating the second table. please reply at the very earliest.
regards
jalandhar
Hi,
I forgot one thing, the attributes and their types of both Source and Target nodes must be identical in this case too.
Regards,
Prabhakaran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jalandhar,
You can also use wdCopyservice.copySubtree() , in that case, then type cast the present node to the type IWDNode. Here is a sample coding,
IWDNode sourceNode = (IWDNode)wdContext.nodeSource();
IWDNode targetNode = (IWDNode)wdContext.nodeTarget();
WDCopyService.copySubtree(sourceNode,targetNode);
all the elements from Source node will be copied to Target node.
Regards,
Prabhakaran.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
The simplest way is by using WDCopyService as follows
IPrivate<View>.I<SourceNode>Node sourceNode=wdContext.node<SourceNode>();
IPrivate<View>.I<TargetNode>Node targetNode=wdContext.node<TargetNode>();
WDCopyService.copyElements(sourceNode,targetNode);
Here both node's structure and elements should be same.
Another method is using for loop, by iterating through source node elements and putting those values to target node
Regards
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.