Scheduler KeyDown and KeyPressed Event Issue

2 posts, 1 answers
  1. Sahand
    Sahand avatar
    7 posts
    Member since:
    Dec 2011

    Posted 23 Mar 2012 Link to this post

    Hi,
    Just reporting what I think might be a bug.
    Using RadScheduler (2011 Q3) in any ViewType, the following events don't fire when pressing arrow keys:
    • KeyDown
    • KeyPressed
    • CellElementKeyDown
    • CellElementKeyPressed

    Can you think of any workaround for this issue? I wanted to use it for solving this.

    PS. I hope you don't mind me posting bugs all the time. I just like your product very much and this is the least I can do to help you improve them ^_^

  2. Answer
    Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 27 Mar 2012 Link to this post

    Hello Sahand,

    Thank you for writing.

    This is rather not a bug, but the desired behavior of RadScheduler. The KeyDown and KeyPressed events are not fired because the navigation arrows are handled in a special way by RadScheduler. To achieve your scenario, you should override the ProcessCmdKey method of RadScheduler:
    public class MyScheduler : RadScheduler
    {
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            bool result = base.ProcessCmdKey(ref msg, keyData);
     
            if (keyData == Keys.Left)
            {
                     //do stuff here
            }
     
            return result;
        }
     
        public override string ThemeClassName
        {
            get
            {
                return typeof(RadScheduler).FullName;
            }
            set
            {
                base.ThemeClassName = value;
            }
        }
    }

    PS. Of course we do not mind receiving your feedback. Any feedback from our users is always welcome.

    Regards,
    Ivan Todorov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top