on 12-02-2007 10:17 AM
Hi everyone,
Lets say I have a node containing 5 rows that I display in a table element.
For some reasons, I do not want to display row 4.
Is it possible to display row 1, 2, 3, 5 without deleting row 4 from that node ?
Thanks.
Regards.
As far as I know, you have to remove the element from the node if it shall not be displayed.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks guys!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you want to achieve this, You have to check one condition before binding it
to the <TableNode>
ForExample,
ArrayList al=new ArrayList();
for(int i=0;i<wdContext.node<DataNode>.size();i++)
{
IPrivate<ViewName>View.I<TableNode>Element tab=wdContext.create<TableNode>Element();
if(i!=3)
{
tab.set<Field1>(wdContext.node<DataNode>().get<DataNode>ElementAt(i).get<Field1>);
tab.set<Field2>(wdContext.node<DataNode>().get<DataNode>ElementAt(i).get<Field2>);
al.add(tab);
}
}
wdContext.node<TableNode>().bind(al);
Ragards
LakshmiNarayana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Fryda,
Create two nodes in the context with same number of attributes.
(a)TableNode (Main node)
(b)BackUpNode (BackupNode)
Now when you don't want to display row 4, then do the following steps.
(1) copy the Table Node to the Backup Node.
WDCopyService.copyElements(wdContext.nodeTableNode(),wdContext.nodeBackUp());
(2) Now delete the row 4 from Table node.
IWDNodeElement nodeElement=wdContext.nodeTableNode().getElementAt(3);
wdContext.nodeTableNode().removeElement(nodeElement);
(3)And if you need the row 4 in future you can take it form BackUpNode or you can copy the backup node back to table node, as done in the first step
WDCopyService.copyElements(wdContext.nodeBackUp(),wdContext.nodeTableNode());
Regards,
Praveen
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 | |
6 | |
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.