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. Image for the cookie policy date

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

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?"

3 Replies

AD Administrator Syncfusion Team June 16, 2005 08:33 PM

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


DD Debasish Das June 17, 2005 11:40 AM

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


AD Administrator Syncfusion Team June 17, 2005 06: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.

Loader.
Live Chat Icon For mobile
Up arrow icon