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

DateTimePickeeExt doesnot takes value from keyboard

Thread ID:

Created:

Updated:

Platform:

Replies:

21132 Nov 3,2004 08:25 AM UTC Feb 5,2008 04:19 PM UTC Windows Forms 6
loading
Tags: Tools
K Sengupta
Asked On November 3, 2004 08:25 AM UTC

Hi, I am presently facing a problem with the DateTimePickerExt. I have used this control in my form and have set its NullString and IsNullDate property. Now when I press any numeric key the control shows the current datetime. My problem is when the user presses a numeric key that number should be reflected. Is that possible? Do suggest me something regarding this issue.

Administrator [Syncfusion]
Replied On November 8, 2004 09:48 AM UTC

Hi Kalyan, Sorry for the delay in responding. Currently there is no way to make the DataTimePicker select the date corresponding to the numeric key pressed. This behavior would require making changes to the library. I have already requested the development team to make the necessary changes and will update this thread when this feature is implemented.Sorry for the inconvenience. Thanks. Best regards, Stephen. >Hi, > I am presently facing a problem with the DateTimePickerExt. I have used this control in my form and have set its NullString and IsNullDate property. Now when I press any numeric key the control shows the current datetime. My problem is when the user presses a numeric key that number should be reflected. Is that possible? > Do suggest me something regarding this issue. >

Jurgen Beck
Replied On December 6, 2004 10:19 PM UTC

I think that''s one of the weakest aspects about the DateTimePickerAdv control! Almost makes it useless for applications where the user wants to enter the date manually via keyboard and does not want to pick it all the time from the Calendar... Jurgen

Administrator [Syncfusion]
Replied On December 10, 2004 06:43 PM UTC

Hi Jurgen, Cuurrently it is possible to key in dates using numeric keys in the DateTimePicker. You would need to set the TabForwarding property to true so that the user can use the Tab key to navigate to the different fields. Could you please let us know the specific behavior you would like to be implemened in the DateTimePicker. We will definitely try to implement them at the earliest. Sorry for the inconvenience. Thanks. Best regards, Stephen. >I think that''s one of the weakest aspects about the DateTimePickerAdv control! Almost makes it useless for applications where the user wants to enter the date manually via keyboard and does not want to pick it all the time from the Calendar... > >Jurgen

Administrator [Syncfusion]
Replied On July 18, 2005 07:50 PM UTC

Hi Stephen I would also like to know how to enable the keyboard entering of data into a datetimecell. Attached is the sample project code I am using for Datetimecell, let me know what changes I need to make. Thanks Srividya VirtualGrid_DateTime_5379.zip

Administrator [Syncfusion]
Replied On July 19, 2005 03:02 PM UTC

In a virtual grid, you have to handle SaveCellInfo to push modified data back into your data source.
private void MyGrid_SaveCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridSaveCellInfoEventArgs e)
{
	if(e.RowIndex > 0 && e.ColIndex > 0)
	{
		this.SetCellValue(e.RowIndex-1, e.ColIndex, e.Style.FormattedText);
	}
    e.Handled = true;
}

private void SetCellValue(int row, int col, object val)
{
	RecordStruct empStruct = m_InfoList[row] as RecordStruct;
	switch(col)
	{
		case 1: 
				empStruct.EmployeeName = val.ToString();
			break;
		case 2: 
			empStruct.EmployeeNum = val.ToString();
			break;
		case 3: 
			empStruct.JoiningDate = val.ToString();
			break;
		default:
			break;
	}
}

David Fernández
Replied On February 5, 2008 04:19 PM UTC

//This works fine for me
private void DateTimePicker_PreviewKeyDown(object sender, System.Windows.Forms.PreviewKeyDownEventArgs e)
{

if (DateTimePicker.IsNullDate)
{
DateTimePicker.IsNullDate = false;
}
//Now you can enter digits again
}


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

;