UI not updated

5 posts, 0 answers
  1. Ken
    Ken avatar
    104 posts
    Member since:
    Aug 2010

    Posted 13 Apr 2011 Link to this post

    Hi,

    I have a RadTimePicker with its SelectedTime property bound to a view-model TimeSpan? property that looks like this:

    public TimeSpan? Time
    {
        get { return time; }
        set
        {
            if (value != null)
            {
                 time = value;
            }
            NotifyPropertyChanged(...);
        }
    }

    So I'd like that when the user clears the input for the time picker the application actually restores the last value automatically. This should normally happen, since in the property setter I check for null and don't save the value, then raise the property changed event.

    However, the input of the time picker stays blank! Can you tell me what I'm doing wrong here? The same approach works fine for a regular SL control (e.g. TextBox).

    Thanks!
  2. Ken
    Ken avatar
    104 posts
    Member since:
    Aug 2010

    Posted 14 Apr 2011 Link to this post

    Interestingly enough, if I bind to the SelectedValue property, which is of type DateTime?, then it works as expected. So I guess there is a bug with SelectedTime?

    Telerik, anyone?
  3. DevCraft banner
  4. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 18 Apr 2011 Link to this post

    Hello Adrian,

    I would recommend you to use the SelectedValue property as it is the property designed to be bound with ViewModels. The SelectedTime property is exposed to be bound in the ControlTemplate of the DateTimePicker control to the Clock template part.
    Though we will investigate the problem with the SelectedTime property as it is supposed to work correctly as well.

    Regards,

    Miroslav Nedyalkov
    the Telerik team

     

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Ken
    Ken avatar
    104 posts
    Member since:
    Aug 2010

    Posted 21 Apr 2011 Link to this post

    Hello Miroslav,

    This is what I'm currently using. Would be nice to know if the problem with SelectedTime is identified and fixed though.

    Thanks,
    Adrian
  6. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 26 Apr 2011 Link to this post

    Hello Adrian,

    We've logged the issue in PITS. You can track its progress using its PITS ID: 5711.

    Kind regards,
    Miroslav Nedyalkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
DevCraft banner