RadDateTimePicker text not showing after enabled/disabled.

5 posts, 1 answers
  1. Jan Pfeffer
    Jan Pfeffer avatar
    55 posts
    Member since:
    Aug 2006

    Posted 28 Sep 2011 Link to this post

    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.
  2. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 30 Sep 2011 Link to this post

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

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Jan Pfeffer
    Jan Pfeffer avatar
    55 posts
    Member since:
    Aug 2006

    Posted 03 Oct 2011 Link to this post

    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
  5. Jan Pfeffer
    Jan Pfeffer avatar
    55 posts
    Member since:
    Aug 2006

    Posted 03 Oct 2011 Link to this post

    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
  6. Answer
    Peter
    Admin
    Peter avatar
    1148 posts

    Posted 06 Oct 2011 Link to this post

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

Back to Top
UI for WinForms is Visual Studio 2017 Ready