ListBox Scroll Position After RadAjaxManager Update

2 posts, 0 answers
  1. Chris
    Chris avatar
    2 posts
    Member since:
    Jul 2011

    Posted 09 Jul 2011 Link to this post

    Good Afternoon,

    I had a general question concerning RadListBox scroll positions after a RadAjaxManager update.

    The scenario is as follows:

    I have a radtreeview that holds product categories and product names
    I have a radlistbox that holds Image Logos that can be assigned to each product.

    When a person clicks on a node in the product tree I grab a LogoID from the node (if one exists) and then search my RadListBox of logos to see if I can match up the ID. If I find the appropriate LogoID in my RadListBox of Logos I set the SelectedIndex to the position in the RadListBox of the appropriate Logo.

    This all works fine. I added a RadAjaxManager so that when you select a RadTreeNode it tells the RadListBox to update itself so the new selection is shown on the appropriate logo image. Problem is everytime I do this even if the Listbox is already scrolled half way down the list for example it will always place the scroll position back to the top to the first Logo. If I remove the RadAjaxManager entry to update the RadListBox it stays at it's current scroll position of course because nothing has updated it (AutoPostBack is off on the ListBox, turning it on does nothing in this case).

    I think this is also affecting my ability to scrollIntoView the selected item as it is always forcing it back to the top of the list. Any ideas why this is happening? I had assumed telling RadAjaxManager to update the RadListbox when a treenode is selected would have just highlighted in position.


    Chris Eisnaugle
  2. Genady Sergeev
    Genady Sergeev avatar
    1595 posts

    Posted 15 Jul 2011 Link to this post

    Hi Chris,

    I've prepared a sample project showing how to workaround this limitation. You can find it attached to this thread.

    Genady Sergeev
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. DevCraft R3 2016 release webinar banner
Back to Top