This is a migrated thread and some comments may be shown as answers.
How to restore keyboard event state after selecting treeview items.
2 Answers 39 Views
This is a migrated thread and some comments may be shown as answers.
Park
Top achievements
Rank 1
Park asked on 05 Dec 2008, 09:14 PM
Hello.

I have a problem about RadTreeView and keyboard.

The layoutRoot grid of My app handles KeyDown event for some purpose.
My app contains one RadTreeView control.

When I select any RadTreeView item, RadTreeView handles input like arrows and page up/down.
I think that it is OK on showing RadTreeView.

But...  RadTreeView still handles keyboard input after I turn off its visibility and therefore the Keydown event handler of my app does not work.

If I type arrow and page up/down keys, RadTreeView.Selected event is fired but KeyDown event of my app is not fired.


I want to handle KeyDown event at my app after hiding RadTreeView.
I already tried with focus method but it did not work.


If you could take a few minutes to answer my questions, I would really appreciate it. (Actually this problem is urgent to me.)

Thank you in advance for your help and apologize for my short English skill.



P.S.

In fact, I have faced into some problems of RadTreeView.
1. ExpandAll method sometimes does not work.
2. The scrollbar of RadTreeView becomes black. I think that previous default color may match Silverlight default controls.

2 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 09 Dec 2008, 12:54 PM
Hi Park,

Handling keyboard events is a little harder in Silverlight than I would have wanted. The problem is of course that there are nor PreviewEvevnts (as in WPF) and we cannot handle handled events (These things are not true for the telerik Routed events btw).

In your particular case: The TreeView should only really handle events if it is focused, have you tried focusing one of the TreeView's parents (or other controls) before hiding it?

We will allow the default behavior to be cancelable in a future version, though I am unsure if the change will make it into the coming Service Pack.

Unfortunately I cannot think of a workaround for the moment.

Yes, I confirmed that the ExpandAll method does not always work. We will be fixing this as well.

As for the ScrollBar color - I cannot judge the design, but the colors can be easily changed, see this blog-post for more information on the subject:

http://blogs.telerik.com/valentinstoychev/posts/08-11-19/Tweaking_the_Theme_colors_for_Telerik_Silverlight_Controls.aspx

Thanks for the feedback,

Sincerely yours,
Miroslav
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Bobi
Telerik team
answered on 16 Jun 2009, 10:54 AM
Hi Park,

The issue with the KeyDown event will be fixed in our next release Q2 which is at the beginning of July.

Greetings,
Boryana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Asked by
Park
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Bobi
Telerik team
Share this question
or