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
close icon

NullReferenceException in DateTimePickerAdv.Value

When I try to set the Value of a date time picker, I get a null pointer exception. The code couldn''t be any simpler: this.dateTimePicker.Value = new System.DateTime(2005, 6, 8, 16, 3, 0, 880); Here''s the stack trace: System.NullReferenceException occurred Message="Object reference not set to an instance of an object." Source="Syncfusion.Tools.Windows" StackTrace: at Syncfusion.Windows.Forms.Tools.DateTimePickerAdv.set_Value(DateTime value) at (mycode).InitializeComponent() in (mysource).cs:line 639 We just upgraded to Visual Studio 2005 and the latest Syncfusion distribution. This worked fine in Visual Studio 2003 with an older version of Syncfusion. It also works fine in a simple test app, but not in our full application. Any ideas?

4 Replies

AR Anupama Roy Syncfusion Team February 28, 2006 01:05 PM UTC

Hi Hurley, This was an issue with DateTimePickerAdv in our Beta versions and we had put a fix for this in final release which worked fine so far.I am looking into this and let you know regarding this. Thank you for your feedback. Regards, Anu.


AD Administrator Syncfusion Team March 3, 2006 03:36 PM UTC

If I comment out this line: dateDateTimePicker.UseCurrentCulture = true; it will run without throwing an exception but the display is blank. Adding this line: dateDateTimePicker.CustomFormat = "dd MMM yyyy"; brings back the text. It was trail and error on each line to figure that out. Previous environment: Visual Studio 2003, Syncfusion 3.0.1.0 New environment: Visual Studio 2005, Syncfusion 4.1.0.50


AR Anupama Roy Syncfusion Team March 6, 2006 06:07 AM UTC

Hi, Thank you for your effort. However,I am unable to reproduce the issue here in my sample.I can proceed furthur only if I have a sample that reproduces the issue.I am attaching the sample I have worked out here. Could you please run this at your end and let me know how it goes? We would appreciate if you can modify this sample and send it back to us for further investigation. Thanks again for choosing Syncfusion. Regards, Anu.

WindowsApplication122.zip


AD Administrator Syncfusion Team March 10, 2006 03:07 PM UTC

I was unable to open the attachment in Visual Studio. Try the attached solution. >Hi, > >Thank you for your effort. > >However,I am unable to reproduce the issue here in my sample.I can proceed furthur only if I have a sample that reproduces the issue.I am attaching the sample I have worked out here. > >Could you please run this at your end and let me know how it goes? We would appreciate if you can modify this sample and send it back to us for further investigation. > >Thanks again for choosing Syncfusion. > >Regards, > >Anu. >

WindowsApplication122.zip

DateTimePickerProblem.zip

Loader.
Live Chat Icon For mobile
Up arrow icon