Skip to Content

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 a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 03, 2007 at 05:47 AM

    Thanks guys!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.