cancel
Showing results for 
Search instead for 
Did you mean: 

Not displaying row of table

david_fryda2
Participant
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

As far as I know, you have to remove the element from the node if it shall not be displayed.

Armin

Answers (3)

Answers (3)

david_fryda2
Participant
0 Kudos

Thanks guys!

Former Member
0 Kudos

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

former_member485701
Active Participant
0 Kudos

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