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.
Unfortunately, activation email could not send to your email. Please try again.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

30394 Jun 16,2005 07:33 PM Jun 17,2005 07:43 PM Windows Forms 3
loading
Tags: GridControl
Debasish Das
Asked On June 16, 2005 07:33 PM

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 16, 2005 09:33 PM

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

Debasish Das
Replied On June 17, 2005 12:40 PM

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 07:43 PM

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.

CONFIRMATION

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.

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.

;