TimePicker Selection on DropDown Causing Lost Focus?

4 posts, 0 answers
  1. Larry
    Larry avatar
    12 posts
    Member since:
    Dec 2009

    Posted 15 May 2014 Link to this post

    Hi,

    I used a TimePicker in RadGridView as editor control,

    var culture = new CultureInfo("en-US") {DateTimeFormat = {ShortTimePattern = "HH:mm"}};
    BindingTarget = RadDateTimePicker.SelectedTimeProperty;
    return new RadDateTimePicker { SelectedTime = (TimeSpan)viewItemHolder[feature], InputMode = InputMode.TimePicker, TimeInterval = TimeSpan.FromMinutes(15), Culture = culture };

    It seems if I select an item in its dropdown list via mouse clicking, it will lost focus and cause the editing row to commit immediately. If I select the item using keyboard (hitting enter), the TimePicker seems stay in focus.

    I didn't notice this problem with RadDatePicker or RadDateTimePicker . Any idea what might go wrong here?
  2. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 20 May 2014 Link to this post

    Hi Larry,

    I test the described scenario with the latest release version and the explained behavior is not present there. So I assume you are using an older version and my suggestion would be to test the same scenario with the newest one and let me know if this helps.

    Hope this will work for you. If you still observe the same behavior using the newest version I'll ask you to share some more details about the exact scenario.

    Regards,
    Kalin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Santhosh
    Santhosh avatar
    2 posts
    Member since:
    Aug 2011

    Posted 09 Jul 2014 in reply to Kalin Link to this post

    Hello Kalin,

    I am using RadTimePicker from version Q2 2014 and I am still getting this issue.

    When I select a time say 6:15 and then I edit to change it to 6:18 and then Click on a Button, the Time value is not bound to the property AtTime in ViewModel.

    XAML :
    <telerik:RadTimePicker x:Uid="uxAtTimePicker" x:Name="uxAtTimePicker" Width="203" VerticalAlignment="Center" SelectedTime="{Binding AtTime, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">

    ViewModel:

    public TimeSpan? AtTime
    {
    get
    {
    return theAtTime;
    }
    set
    {
    theAtTime = value;
    base.OnPropertyChanged("AtTime");
    }
    }

    Best Regards,
    Santhosh B
  5. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 10 Jul 2014 Link to this post

    Hi Santhosh,

    We aware of the explained issue and have it already logged in our Feedback portal. You can easily track its status on the following link:
    http://feedback.telerik.com/Project/143/Feedback/Details/133215-selectedtime-property-of-timepicker-is-not-updated-correctly-when-manually-changi

    However currently as a work around you can use RadDateTimePicker with InputMode TimePicker instead. You would need to bind the SelectedValue property to a DateTime? property in the ViewModel and will have to extract the Time from the SelectedValue in order to get the correct SelectedTime.

    I apologize for any inconvenience caused. If you have any other questions let us know.

    Regards,
    Kalin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top