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

RadSpinEditor commandBinding

2 Answers 100 Views
SpinEditor
This is a migrated thread and some comments may be shown as answers.
Ankur Khator
Top achievements
Rank 1
Ankur Khator asked on 10 Aug 2009, 01:21 PM
Hi,
I have setup CommandBinding on my RadSpinEditor with Command as FocusCommand. Upon pressing the shortcut using keyword, spinEditor does not gain focus.

I see similar problems with RadComboBox also. Please help me in setting up focus on these controls using keyboard shortcut.

Thanks
Ankur

2 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay
Telerik team
answered on 13 Aug 2009, 12:18 PM
Hello Ankur Khator,

Thank you for contacting us.

Currently, we have an issue with calling the Focus() method on the RadComboBox and RadSpinEditor controls. The FocusCommand is calling the Focus() method and since this is not currently applicable for RadComboBox and RadSpinEditor, these controls as not focused.

You need to implement a custom command following the command pattern from this Knowledge Base article: Reusing the command pattern implemented in TPF. Please note that in order to focus the desired controls you need to call the Focus() method on their RadTextBoxItems. You can get access to the items by using the TypeSelector.

The whole approach is demonstrated in the attached sample project. I hope this helps. If you have additional questions, feel free to contact me.

All the best,
Nikolay
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.
0
Ankur Khator
Top achievements
Rank 1
answered on 19 Aug 2009, 06:52 AM
Thanks Nikolay.
This works. Sample project is very helpful.


Thanks
Ankur
Tags
SpinEditor
Asked by
Ankur Khator
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Ankur Khator
Top achievements
Rank 1
Share this question
or