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

ListBox Selection Display is not refreshed after scrolling

8 Answers 162 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jens
Top achievements
Rank 1
Jens asked on 16 Jul 2009, 04:05 PM
Hi,
My ListBox is populated with more items than fit into it, and I can thus scroll up and down.
Now, when I select an item and then scroll until it is not displayed anymore, and then scroll back, the selected item is not shown in "selected" style anymore.
Only when I move the mouse over the item, it is displayed in "selected" style again afterwards.

This problem seems to be related with this one:
http://www.telerik.com/community/forums/winforms/gridview/radgridview-row-formatting.aspx

i.e. "Only the rows that are visible on screen have visual elements. When the grid is scrolled, the visual elements are reused for other logical elements."

But I want my ListBox to show the selected items. The user doesn't want to play hide and seek.
What do I need to do?
/J

8 Answers, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 17 Jul 2009, 11:02 AM
Hello Jens,

This is really a weird issue. I tested the behavior in a simple application with the latest version of RadControls for WinForms and I was not able to reproduce it. Could you please try the same with the latest version of our product? I believe this will solve the issue.

Please feel free to write me back if you have more questions.


Kind regards,
Boyko Markov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jens
Top achievements
Rank 1
answered on 17 Jul 2009, 11:40 AM
Hi Boykov,
I also created a new simple project: Just a list box and some items, nothing else. After I scroll down and up after selecting the first item, during which the selected item dis- and re-appeared, the orange selection color is not visible. Only after a MouseOver, the color returns to the selcted item. So here the effect is very well reproduceable.

Hope you can help me.

I work with Windows XP SP3, .NET 3.5 SP1 and the Q2/2009 controls

Best regards,
Jens
0
Accepted
Boyko Markov
Telerik team
answered on 20 Jul 2009, 06:58 AM
Hi Jens,

I have been able to reproduce this in a new project. I was actually testing this it in our QSF example of RadListBox when I wrote you previously. The issue seems to be related to our Theming mechanism.
We will do our best to fix this for the coming Service Pack release scheduled for the end of the month.
However as soon as I prepare a working .xml file with a new theme for RadListBox  I will send it to you and the problem will be fixed.
At the moment I can suggest you a little patch which will visually make the control to appear as expected. Follow the steps:

1. Subscribe to the ValueChanged event of the listbox control
  RadScrollLayoutPanel panel = listBox.ListBoxElement.Children[2] as RadScrollLayoutPanel;
            panel.VerticalScrollBar.ValueChanged += new EventHandler(VerticalScrollBar_ValueChanged);

2. Refresh the Selection state of the selected listbox item
 RadListBox listBox =  (RadListBox)this.Controls[0];
           RadListBoxItem item = listBox.SelectedItem as RadListBoxItem;
           item.SetValue(RadListBoxItem.SelectedProperty, false);
           item.SetValue(RadListBoxItem.SelectedProperty, true);

Thank you for the feedback.
I have added telerik points to your account for this bug report.

Best wishes,
Boyko Markov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jens
Top achievements
Rank 1
answered on 20 Jul 2009, 08:01 AM
Excellent,
thank you, Boyko!

/J
0
Gary Gorham
Top achievements
Rank 1
answered on 30 Oct 2009, 06:13 PM
Can you tell me if this has been fixed yet ?

Thank you

Gary
0
Victor
Telerik team
answered on 02 Nov 2009, 08:16 AM
Hello Gary Gorham,

Thank you for the question. Please specify which theme you are using for RadListBox? I confirm that this issue is fixed but I need this information to test it (just in case). I am looking forward to your reply.

Best wishes,
Victor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Gary Gorham
Top achievements
Rank 1
answered on 02 Nov 2009, 04:27 PM
Hi Victor -

I am using the Telerik theme and the RadListbox control version is 2009.2.9.729. I am still having this same problem.

Thanks for your help.

Gary
0
Victor
Telerik team
answered on 03 Nov 2009, 10:05 AM
Hi Gary Gorham,

Thank you for the provided information. I experienced the issue with the Telerik theme. It appears that this happens because of the virtualization mechanism. You can circumvent this issue by setting the Virtualized property of RadListBox to false. The virtualization is scheduled for re-factoring and the major improvements will be available in Q1 2010. Also please note that in a few days we will be releasing Q3 2009 release which includes a more robust data binding mechanism for RadListBox as well as overall performance and memory usage improvements. You will be able to see all the new features on our web site when we release the new version. Please write again if you have other questions.

Sincerely yours,
Victor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
Jens
Top achievements
Rank 1
Answers by
Boyko Markov
Telerik team
Jens
Top achievements
Rank 1
Gary Gorham
Top achievements
Rank 1
Victor
Telerik team
Share this question
or