Disable ComboBox Auto Scroll Behaviour

9 posts, 0 answers
  1. Mike
    Mike avatar
    20 posts
    Member since:
    Aug 2011

    Posted 03 Dec 2011 Link to this post

    Hello,

    I am wondering if it is possible to disable the autoscrolling behaviour in a combobox drop down (e.g. if last visible item in dropdown is selected the list jumps one item to bring the next item into view). Unfortunately this behaviour also fires when the mouse is hovered over the last visible item.

    This is very irritating for my users where the combobox is located near the bottom of the screen and the list is displayed upwards. What usually happens is that the user clicks the combobox arrow, the list is displayed upwards and as soon as the mouse is moved up the list (passing the last item in the list which is not fully displayed) the whole list jumps by one. An even worse scenario is where the user scrolls the desired item into view (desired item is now at bottom of visible drop down) but as soon as he/she hovers over the item to click it it jumps up by one.

    Is there an option / way to disable this?

    Many Thanks,

    Mike
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 06 Dec 2011 Link to this post

    Hi Mike,

    Unfortunately there is no way to disable this behavior. You could "hide" it to large extent by setting such MaxDropDownHeight on RadComboBox so it does not display some of its items partially. This depends on the themes, so I guess you should experiment a little until you find the right number. For example, MaxDropDownHeight=205 corrected the problem on my side (using the default theme).

    Greetings,
    Valeri Hristov
    the Telerik team

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

  3. Mike
    Mike avatar
    20 posts
    Member since:
    Aug 2011

    Posted 26 Dec 2011 Link to this post

    Thanks Valerie, I did notice (as you suggest) that it does get better with adjusting MaxDropDownHeight. I am a bit concerned though that this might not work for all DPI settings?
  4. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 28 Dec 2011 Link to this post

    I performed a quick test with 100%, 125% and 150% (the standard settings in Windows 7 control panel) and the WPF application UI scaled nicely without breaking the workaround I suggested.

    By the way the auto scroll is a "feature" of the standard ScrollViewer in WPF - the standard WPF ComboBox also has it, in lower extent, however, because its dropdown is evenly sized with its items...

    Greetings,
    Valeri Hristov
    the Telerik team

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

  5. Mike
    Mike avatar
    20 posts
    Member since:
    Aug 2011

    Posted 29 Dec 2011 Link to this post

    Thanks for trying this out, much appreciated.
  6. srinivas
    srinivas avatar
    2 posts
    Member since:
    Jun 2017

    Posted 20 Jun in reply to Valeri Hristov Link to this post

    Hi i am also looking a solution for this. items are getting scrolled automatically.
  7. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    570 posts

    Posted 23 Jun Link to this post

    Hello srinivas,

    Please try setting the ScrollViewer.CanContentScroll attached property of the RadComboBox control to False and let me know how this goes.

    Regards,
    Dilyan Traykov
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  8. srinivas
    srinivas avatar
    2 posts
    Member since:
    Jun 2017

    Posted 23 Jun Link to this post

    I tried the above suggestion ScrollViewer.CanContentScroll  to false.but it didnt worked 
  9. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    570 posts

    Posted 26 Jun Link to this post

    Hi srinivas,

    I'm attaching a sample project where the aforementioned approach seems to work at my end.

    Could you please have a look at it and let me know how it differs from your setup?

    Regards,
    Dilyan Traykov
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top