Skip to Content
avatar image
Former Member

Not displaying row of table

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 02, 2007 at 09:20 PM

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

    Armin

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 03, 2007 at 02:30 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 03, 2007 at 04:50 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 03, 2007 at 05:47 AM

    Thanks guys!

    Add comment
    10|10000 characters needed characters exceeded