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.
Syncfusion Feedback

DateTimePickerExt

Thread ID:

Created:

Updated:

Platform:

Replies:

12801 Apr 13,2004 09:42 AM UTC Apr 14,2004 09:19 PM UTC Windows Forms 3
loading
Tags: Tools
Peter
Asked On April 13, 2004 09:42 AM UTC

I have a problem using a DateTimePickerExt in a grid cell. I derived a cellmodel and cellrenderer and all works fine. But the problem is: I step through the values with the arrow keys and if I''m at the right most field and press the right arrow key the selection moves to the left most field and not to the next cell. Is there a way around this?

Administrator [Syncfusion]
Replied On April 14, 2004 05:09 AM UTC

The DataTimePickerAdv processes the arrow keys at this point, and this is why you see this behavior, They wrap within the control. You face the same problem with the up and down arrows. They do not navigate the grid either, but spin the field value. One comment is the the Tab key seems to move off the DateTimePicker cell if you are using the code from a Grid forum post. If you want to change this behavior, you will have to derive the DateTimePickerAdv control, and override ProcessCmdKey. In Your override, if you are on the right field and the key is Key.Right, then you would just return false. This would pass the key back to the grid which would then handle it. If you are using the code from the grid forum, the DateTimePickerAdv is already derived, and ProcessCmdKey is overridden to pass the keys.Enter back to the grid. But the problem with the Keys.Right is that I cannot see any exposed way to determine when you are on the right-most field. And without this knowledge, you would not be able to get things to work as you want. Maybe someone else will post on how you might be able to determine when you are on the right-most field.

Administrator [Syncfusion]
Replied On April 14, 2004 09:01 AM UTC

Unfortunatelly the property "SelectedField" is a private property in the control, so I can''t access the value to check in which field I am... So it seems like there is no chance to get the correct arrow key behaviour for the right and left arrow key. For the up and down arrow key I handled it - in the derived class.

Administrator [Syncfusion]
Replied On April 14, 2004 09:19 PM UTC

Hi, We have now added a protected virtual bool JumpField() method to the DateTimePickerAdv control. When the marginal field is selected and the opposite key is pressed (right field is selected and right key is pressed or same with left) this method gets called. If it returns true (default value) the field jumps to the other end and it behaves as before, but if it returns false the key event is passed on and the next field is not selected. This feature will be available in the next release of Essential Suite. Please let me know if you need any other information. Regards, Guru Patwal Syncfusion, Inc.

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.

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

;