We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How do I make the left/right cursor keys move focus within the fields in a DateTimePicker cell ?

Thread ID:





30394 Jun 16,2005 11:33 PM UTC Jun 17,2005 11:43 PM UTC WinForms 3
Tags: GridControl
Debasish Das
Asked On June 16, 2005 11:33 PM UTC

When a particular field (say hour) in the Date Time Picker is selected and I press the left/right cursor keys, the focus moves to the previous/next grid cell. How can I modify it so that the focus moves to the next field (say minute) within the Date Time Picker cell and moves to the next grid cell only when I press TAB. I am referring to the code attached with the existing article on "How do I add a DateTimePicker cell to a grid?"

Administrator [Syncfusion]
Replied On June 17, 2005 01:33 AM UTC

Check out the sample in this thread. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=29273

Debasish Das
Replied On June 17, 2005 04:40 PM UTC

Hi, I checked out the sample code in the mentioned article. While trying to run the application it throws a runtime invalid license exception. I do not have license for the Tools package. How can I modify the DateTimePicker cell to achieve the mentioned functionality? Thanks

Administrator [Syncfusion]
Replied On June 17, 2005 11:43 PM UTC

You can catch the arrow keys in the ProcessCmdKey override that is already in the derived DateTimePicker in that sample. At that point, if it is a right arrow, you would want to move to the next gadget to the right in the DateTimePicker. The problem is that this control does not expose any means to select another gadget in the control. So, I do not know of a good way to get this working. You could possibly poke around with .Net Reflector to see if you could spot a private method in the control that does what you need. Then you could use reflection to call this method in your ProcessCmdKey override.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon