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.

DateTime Cell

Thread ID:

Created:

Updated:

Platform:

Replies:

30086 Jun 10,2005 05:42 AM Jun 10,2005 11:53 AM Windows Forms 4
loading
Tags: GridControl
seb
Asked On June 10, 2005 05:42 AM

Hello, I''m using the DateTimeCell cell type in order to edit time values in the grid. My problem is: I don''t want the control to check the validity of the date before the user validates the cell. For example: I am using the following date format: DD/MM/YY If the current date is 01/02/05, the user wants to enter 30/03/05. When he starts typing ''3'' then the control puts ''03'' for the days and switches to the month part of the control. If it''s not possible to do that, is there another control I can use instead? Thanks in advance, Sebastien

Administrator [Syncfusion]
Replied On June 10, 2005 07:29 AM

If you have our Tools library, I think you can use our DateTimePickerAdv in a cell to get this behavior. Here is a sample. http://www.syncfusion.com/support/user/uploads/datepickercell.zip That control lets you autoforward the keys which I think is what you are requesting. This above sample does not have these propertues set, but you can modify the code to set them by adding the constructor to the MyDateTimePicker class.
public MyDateTimePicker() : base()
{
	this.AutoForwarding = true;
	this.TabForwarding = true;
}

seb
Replied On June 10, 2005 08:28 AM

I am using the tools library and your DatePickerCell. It works fine except that I really need this feature : be able to type 31 in the part of the control that represents the days even if the selected month is february or a month with 30 days. My users want the following custom date format: "dd/MM/yy" so they type the value for the days before the one for the month. So in my previous example, if the current date is 01/02/05, the user wants to enter 30/03/05. When he starts typing ''''3'''' then the control puts ''''03'''' for the days and switches to the month part of the control (as autoforwarding is set to true). It is really paintful for the user because he has to change the month before changing the days :(

Administrator [Syncfusion]
Replied On June 10, 2005 11:42 AM

We will make it a feature request to handle this problem somehow (allow you to turn off validation until you leave the control maybe, or raise an event that will allow you to override the validation). Until we have a release with this implemented, the only way I would know to do this is to copy our source code for the DataTimePickerAdv into your own class, and tweak it to ignore validation when needed.

seb
Replied On June 10, 2005 11:53 AM

Thank you, Clay. Have a good week end.

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.

;