Skip to Content
avatar image
Former Member

How to create a tree which is expanded default?

Hi Gurus,

A tree(recursive) has been created with following structures. It is expected that all the tree leaves could be expanded initially when the tree appears. I can only show the 1st level NODES when the tree appears, but don't know how to show the LEAVES..

Any instructions? Thanks in advance.

TREE
   |__ NODE1
           |__ LEAF1
           |__ LEAF2
   |__ NODE2
           |__ LEAF3
   |__ NODE3
           |__ LEAF4

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Jun 14, 2010 at 06:09 AM

    Hi,

    Check the expanded property of TreeNodeType to 'X'.

    It will display ur tree with default nodes expanded to display the items.

    Thanks and Regards,

    Divya S

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 14, 2010 at 06:06 AM

    Fill the entire context in WDDOINIT and set expanded property of the TREE UIelement always to ABAP_TRUE or Checked

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 17, 2010 at 07:14 AM

    Hi,

    Try the following Web Dypro component: WDR_TEST_EVENTS. This has lot of examples on trees. It will be helpful.

    Regards,

    Saud

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Solved.

      Solution is: don't tick the EXPAND property in TreeNodeType, but bind the property to an attribute under the same context node of TreeNodeType, and set it as true for every element.

      Thanks to everyone.