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

Can I disable a RadTreeViewItem but still have its children enabled?

3 Answers 75 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Andrei Rinea
Top achievements
Rank 1
Andrei Rinea asked on 08 Jul 2011, 12:50 PM
I have a hierarchy of items and when I double click one item I asynchronously open the document represented by that item in a working area. During the (potentially) long open action I disable that item so the user can't double click it again, or rename it or delete it etc.

However I've seen that its children also get disabled by this and I don't want this.

Can I just disable one item without having its children disabled?

3 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 13 Jul 2011, 09:06 AM
Hello Andrei Rinea,

When disabling a RadTreeViewItem and having in mind that its child RadTreeViewItems are part of its Template, it is expected that they get disabled too. This is by design and you cannot change it out of the box.

Regards,
Petar Mladenov
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Andrei Rinea
Top achievements
Rank 1
answered on 13 Jul 2011, 09:33 AM
I understand very well as this is something any WPF component does. My question should have been 'is there an (easy?) way to disable the node and have its children enabled'?

Thank you,
Andrei Rinea.
0
Accepted
Petar Mladenov
Telerik team
answered on 14 Jul 2011, 08:18 AM
Hello Andrei Rinea,

No , there is no easy way to implement this. You can try to play with the style of the item that you want to be disabled and use its PreviewChecked and PreviewSelected events in order to simulate its disabled behavior.


Greetings,
Petar Mladenov
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
TreeView
Asked by
Andrei Rinea
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Andrei Rinea
Top achievements
Rank 1
Share this question
or