AD
Administrator
Syncfusion Team
January 14, 2004 03:19 PM UTC
Hi Stefan,
Thanks for bringing this to our attention. This problem occurs only when the DateTimePicker is added to the Form through the designer, since in this case the Calendar control gets created eventhough it is not in use. The Calendar control in the DateTimePickerExt/DateTimePickerAdv internally uses a GridControl. Hence the initialization time of this Control is considerably high when compared to our other controls.
The workaround here would be comment out/remove all the designer generated code related to the DateTimePickerAdv''s Calendar in the Form''s InitializeComponent method. This would ensure that the Calendar is not created initially when the application loads and hence the application initialization time would be minimized to a great extent. Please try this and let me know if this meets your requirements.
Regards,
Guru Patwal
Syncfusion, Inc.
SL
Stefan Lundberg
January 15, 2004 12:10 PM UTC
Hi Guru.
I have tested this by commenting out the calendar related code and got improved performance, thanks.
I haven''t done the final solution where this code is applied later on (when dropping the calendar..?) since I guess it is needed then.
Thanks again.
Regards
Stefan
ps. Maybe this change should be done in the Syncfusion Tools.. ds.
AD
Administrator
Syncfusion Team
January 15, 2004 02:12 PM UTC
Hi Stefan,
You do not have to explicitly add code to create a DateTimePickerAdv Calendar at a later stage when you wish to use the dropdown Calendar. This is code will be generated automatically. However, the Calendar display is slightly slower for the first time since it takes time for initialization and JIT compiling. But it works fine for the subsequent usages. Please let me know if you need any other information. We appreciate your feedback on this issue.
Regards,
Guru Patwal
Syncfusion, Inc.
SL
Stefan Lundberg
January 16, 2004 06:42 AM UTC
Hi and thanks for your response.
I''ve checked more on this and with your current implementation I have to reinitiate a number of values when the popup is shown (MonthCalendarExt). Even though these are set initially.
We do some customizations, null button, max/min dates etc but I cannot understand the implementation in DateTimePickerExt.
In all properties there are checks for this ''this.monthCalendar!=null'', ok that''s fine.
There is a store ''DateTimePickerExtCalendarStore'' that holds these values but the store isn''t updated correctly.
See methods ''InitializeCalendarStore'', ''InitializePopup'', ''EnableNullDate'', ''MinValue'', ''MaxValue'' (etc).
Why isn''t this.cStore updated?
When the popup is initialized old data is used.
As I see it the intended functionality doesn''t work and I have to implement what I have described in previous posts.
Best regards
Stefan
SL
Stefan Lundberg
January 16, 2004 11:58 AM UTC
Hi,
The problem I find is that the None button is shown even though I''ve set that is shouldn''t be.
I''ve added this code and want your opinion if this is correct or not. Have I misunderstood the
complete problem and is doing something wrong?
(sorry about word wraps)
protected override void OnOnPopup(System.EventArgs e)
{
base.OnOnPopup(e);
// We have delayed our creation of the dropdown calendar to get faster form loads.
// Syncfusion does though not initialize the calender correctly so we need this code
// to set some properties again..
// See this post: http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=9862 (''Performance of DateTimePickerExt'')
if( !this.m_calendarInitialized )
{
this.m_calendarInitialized = true;
base.EnableNullDate = !base.EnableNullDate;
base.EnableNullDate = !base.EnableNullDate;
// base.MinValue = base.MinValue;
// base.MaxValue = base.MaxValue;
}
}
Don''t know if Min/MaxValue is a problem but it is handled incorrect as EnableNullDate.
Regards
Stefan
ps. OnBeforePopup doesn''t work, check line 2405-2406 in DateTimePickerExt (2.0.2.0). ds.
AD
Administrator
Syncfusion Team
January 16, 2004 05:12 PM UTC
Hi Stefan,
Thanks for the information, and for the code snippet above. I have consulted the Essential Suite development team regarding this issue. We will further investigate this and I will keep you posted on the developments. We appreciate your patience, and thanks for your feedback.
Regards,
Guru Patwal
Syncfusion, Inc.
AD
Administrator
Syncfusion Team
January 19, 2004 01:17 PM UTC
Hi Stefan,
All of the above mentioned issues have been taken care of now, and the fixes will be available in the next build of Essential Suite. Please open an incident in DirectTrac in this regard, and I will update you there with further details on these problems and the fixes. We appreciate your cooperation, and thanks for considering Syncfusion products.
Regards,
Guru Patwal
Syncfusion, Inc.
SS
Simon Storr
February 16, 2004 12:09 PM UTC
The performance hit for us anyway is due to it throwing up a silent exception
for the DateTimePicketExt dtpDate -
this.dtpDate = new Syncfusion.Windows.Forms.Tools.DateTimePickerExt();
((System.ComponentModel.ISupportInitialize)(this.dtpDate)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dtpDate.Calendar)).BeginInit();
this.SuspendLayout();
The line
((System.ComponentModel.ISupportInitialize)(this.dtpDate.Calendar)).BeginInit();
throws up
A first chance exception of type ''System.FormatException'' occurred in mscorlib.dll
Additional information: Input string was not in a correct format.
Commenting out this line throws up the same exception the first time dtpDate.Calendar is referenced, in this case -
this.dtpDate.Calendar.AllowSelection = Syncfusion.Windows.Forms.Grid.GridSelectionFlags.None;
AD
Administrator
Syncfusion Team
February 16, 2004 10:11 PM UTC
Hi Simon,
Thanks for bringing this to our attention. However we could not observe any exceptions when we tested for this issue using our latest release, v2.0.2.1. Several related fixes/improvements have been performed on the DateTimePickerExt since the release of v1.6.1.8, our last 1.6 build. If you are using an earlier version please create an incident in DirectTrac in this regard, and I will update you with the download instructions for v2.0.2.1. Thanks for coooperation.
Regards,
Guru Patwal
Syncfusion, Inc.
CA
Carl
April 5, 2004 09:07 AM UTC
I´ve seen a related bug to this problem. When we comment out all the calendar code before popup we get a crash if we press the enter or escape key. This is because you override ProcessCmdKey and check "popupWindow.IsShowing()" even though popupWindow isn´t initialized. We are about to release an application built on ver 1.6.1.8 could we get a patch to fix this problem?
AD
Administrator
Syncfusion Team
April 5, 2004 04:35 PM UTC
Hi Carl,
Thanks for opening an incident in DirectTrac in this regard. I will update you there from now on. We appreciate your interest in Syncfusion products.
Regards,
Guru Patwal
Syncfusion, Inc.