Changing SelectedTime during the SelectedTimeChanged event does not update view

4 posts, 0 answers
  1. Doug Lott
    Doug Lott avatar
    8 posts
    Member since:
    Nov 2004

    Posted 03 Apr 2009 Link to this post

    If during the SelectedTimeChanged, I change the selectedTime value, the underlying property will change but the view stays at the old value.  Is there some other method that needs to be called to update the control's view?

    Thanks,

    Doug
  2. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 06 Apr 2009 Link to this post

    Hi Doug,

    SelectedTimeChanged is called when the the SelectedTime property value is already changed.
    If you want to change the selected value (update the control's view) just change the value of SelectedTime property.You do not need to subscribe to this event because it is called each time the value has changed.
    In order to change the SelectedTime just do the following for example:

    <input:RadTimePicker  x:Name="timePicker"/>

    public Page()
            {
                InitializeComponent();
               this.timePicker.SelectedTime = new TimeSpan(5, 5, 5, 0, 0);
           }

    In this example the control view is updated with the new value in the constructor of the application.
    Please let me know if you have any other questions.

    Kind regards,
    Boryana
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  3. DevCraft banner
  4. Doug Lott
    Doug Lott avatar
    8 posts
    Member since:
    Nov 2004

    Posted 06 Apr 2009 Link to this post

    Maybe I wasn't clear regarding my problem.  I understand that one does not need to subscribe to the changed event to actually change the value of the control.  However I wish to do some validation within the the changed event.  If validation fails, I need for the value of the the control to change to something else.  If I do this, the new value does not propogate to the view.

    Doug
  5. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 08 Apr 2009 Link to this post

    Hello Doug Lott,

    Thank you for reporting this issue. The problem is already fixed and the change will be reflected in our SP1 release which is in a few days. I hope this timeframe is acceptable for you.

    Sincerely yours,
    Boryana
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top