This is a migrated thread and some comments may be shown as answers.

RadDateTimePicker text not showing after enabled/disabled.

4 Answers 85 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
Jan Pfeffer
Top achievements
Rank 1
Jan Pfeffer asked on 28 Sep 2011, 12:15 PM
Hey at Telerik

I have found a bug in the RadDateTimePicker.
When the control is continuously enabled/disabled the Text element of the control stops showing the date.

I need this functionality to rebind a RadDateTimePicker to a SelectionChanged event on a RadGrid.

I have reproduced the bug in a little test project (Of cource without references). http://kort2.lifa.dk/examples/RadDateTimePickerMissingDateText.rar

Try and disable/enable the RadDateTimePicker numerous times, after fourth click the Text control element of the RadDateTimePicker stops working.

Sincerly Jan.

4 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 30 Sep 2011, 05:05 PM
Hi Jan,

Thank you for writing and for the provided project.

I can confirm the described behavior and would like to suggest using DateTimePickerElement's Enabled property, for example:

this.radDateTimePicker1.DateTimePickerElement.Enabled = false;

Please refer to the modified project. I have updated your Telerik points for bringing this issue to our attention.

Let me know if you have any additional questions.

Regards,
Peter
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Jan Pfeffer
Top achievements
Rank 1
answered on 03 Oct 2011, 11:01 AM
Hey Peter
The problem still exists, i'm using version latest dev version 2011.2.11.831,
i can see you have referenced a much older version 2010.3.10.1215.

Am i supposed to revert back to this version?

This would have a big impact om the rest of project!

Sincerly

Jan
0
Jan Pfeffer
Top achievements
Rank 1
answered on 03 Oct 2011, 01:54 PM
Hey Peter.

I have lookied at the modified example you sent back.
Apparently you also changed the reference to the DateTime object reference from this.datetime to DateTime.Now.
It works if DateTime.Now is reference but fails if another DateTime is referenced.

I need to reference a specific date and not DateTime.Now.

The problem must be that the text element doesn't refresh onless the date is changed.

Sincerly
Jan
0
Accepted
Peter
Telerik team
answered on 06 Oct 2011, 11:51 AM
Hi Jan,

Thank you for writing back.

I can confirm that the scenario works properly only with DateTime.Now. As a workaround, please set value to DateTimePickerElement.TextBoxElement:

this.on = this.radDateTimePicker1.DateTimePickerElement.Enabled = true;
this.radDateTimePicker1.DateTimePickerElement.TextBoxElement.Value = this.dateTime;            
this.radButton1.Text = "Turn off";

In my project I referenced our latest assemblies (2011.2 11.831). However, if you do not have these assemblies at the same location I have them on my PC and at the same time you have 2010.3.10.1215 installed, Visual Studio may change the references taking the assemblies from your GAC. I hope this clarifies the case.

Please find the modified project.

I hope this helps.

Best wishes,
Peter
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
Jan Pfeffer
Top achievements
Rank 1
Answers by
Peter
Telerik team
Jan Pfeffer
Top achievements
Rank 1
Share this question
or