Toggle node expansion on single click

7 posts, 1 answers
  1. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 25 Sep 2008 Link to this post

    I'm trying to create "Expand node on single click" functionality for the treeview, but with no luck. I've tried using the Selected event, but that doesn't work since it is not fired when an already selected node is clicked. What I want is basically for IsExpanded to be toggled between true/false whenever a node is clicked. Any suggestions on how to achieve this? (It would be great if there was an "IsExpandOnSingleClickEnabled" property like there is for double click)
  2. Answer
    Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 25 Sep 2008 Link to this post

    Hello Henrik,

    Thanks for the suggestion for the "IsExpandOnSingleClickEnabled" property. We will add this with the next release.

    For the moment the only workaround I can think of, is to handle the MouseLeftButtonUp event and to execute the toggling logic there.

    Sincerely yours,
    Valentin.Stoychev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. DevCraft banner
  4. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 26 Sep 2008 Link to this post

    That's great news! When you say "next release", what exactly does that mean?
  5. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 29 Sep 2008 Link to this post

    Hello Henrik,

    This is something minor, so I think that with the RC release this week we will be able to have this implemented.

    Kind regards,
    Valentin.Stoychev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 29 Sep 2008 Link to this post

    Excellent. Thanks!
  7. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 01 Oct 2008 Link to this post

    Hello Henrik,

    Just to confirm that the IsExpandOnSingleClickEnabled is implemented within the RC release that will be available for download later today. you can check the "ExpandMode" example from the TreeView QSF, once you download the controls.

    Kind regards,
    Valentin.Stoychev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 01 Oct 2008 Link to this post

    Great! Thanks for that.
Back to Top
DevCraft banner