RadSpinEditor commandBinding

3 posts, 1 answers
  1. Ankur Khator
    Ankur Khator avatar
    6 posts
    Member since:
    Aug 2009

    Posted 10 Aug 2009 Link to this post

    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. Answer
    Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 13 Aug 2009 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ankur Khator
    Ankur Khator avatar
    6 posts
    Member since:
    Aug 2009

    Posted 19 Aug 2009 Link to this post

    Thanks Nikolay.
    This works. Sample project is very helpful.


    Thanks
    Ankur
Back to Top