Skip to Content
author's profile photo
Former Member

Tree MultiSelect

Hi,

I have a tree displaying a heirarchy. This tree should have a facility of selecting multiple rows. To do this, I used the method that is most recommended, i.e. to have 2 images, one for each state of a checkbox and toggle betwwen the 2 on the onSelect event.

This is working fine except one minute detail. The onSelect should be triggered only with the item of the tree is selected and not when I click the expand/collapse image (triangle) at the side of each node. This works fine on clicking expand, i.e. the onSelect is not triggered, but on clicking collapse, the onSelect is triggered.

This is very annoying since if a user has expanded a node by mistake and has to collapse that node, the onSelect also gets fired and the state gets toggled.

Has anyone else also noticed this? I am using SP11, donno if this has been fixed in a future release.

Nirav

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Sep 30, 2005 at 11:35 AM

    set ignoreAction property of tree node to true.

    I hope it ll help u.

    Add comment
    10|10000 characters needed characters exceeded

    • get reference of your node type in doModifyView() method assign the

      reference to a public static variable

      public static IWDTreeNodeType nodeType;

      nodeType = (IWDTreeNodeType) view.getElement("Node");

      in the onAction event method

      check whether it is expanded.

      if (nodeType.getExpanded())

      handle ur code accordingly

  • Oct 05, 2005 at 12:40 PM

    get reference of your node type in doModifyView() method assign the

    reference to a public static variable

    public static IWDTreeNodeType nodeType;

    nodeType = (IWDTreeNodeType) view.getElement("Node");

    in the onAction event method

    check whether it is expanded.

    if (nodeType.getExpanded())

    handle ur code accordingly

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Monalisa,

      Yes, besides, you are for getting...as I have said, I need to keep each and every node of the tree selectable. So a user may not yet have expanded a particular node, but may want to select it.

      Thanks for trying.

      Nirav.