This is a migrated thread and some comments may be shown as answers.

ListBox Scroll Position After RadAjaxManager Update

1 Answer 105 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 10 Jul 2011, 12:49 AM
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.

Thanks,

Chris Eisnaugle

1 Answer, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 15 Jul 2011, 09:21 AM
Hi Chris,

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

Greetings,
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!

Tags
ListBox
Asked by
Chris
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Share this question
or