This is a migrated thread and some comments may be shown as answers.

Toggle node expansion on single click

6 Answers 80 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
hwsoderlund
Top achievements
Rank 1
hwsoderlund asked on 25 Sep 2008, 02:12 PM
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)

6 Answers, 1 is accepted

Sort by
0
Accepted
Valentin.Stoychev
Telerik team
answered on 25 Sep 2008, 03:31 PM
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.
0
hwsoderlund
Top achievements
Rank 1
answered on 26 Sep 2008, 07:03 AM
That's great news! When you say "next release", what exactly does that mean?
0
Valentin.Stoychev
Telerik team
answered on 29 Sep 2008, 07:34 AM
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.
0
hwsoderlund
Top achievements
Rank 1
answered on 29 Sep 2008, 07:40 AM
Excellent. Thanks!
0
Valentin.Stoychev
Telerik team
answered on 01 Oct 2008, 09:47 AM
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.
0
hwsoderlund
Top achievements
Rank 1
answered on 01 Oct 2008, 10:06 AM
Great! Thanks for that.
Tags
TreeView
Asked by
hwsoderlund
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
hwsoderlund
Top achievements
Rank 1
Share this question
or