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

Set RadListBox.Height cause not correct behavior when postback

3 Answers 75 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Dylan Lin
Top achievements
Rank 1
Dylan Lin asked on 15 Jan 2010, 04:45 AM
Hi all,

I have a RadListBox in my aspx page, and it has many items (more than 50). So I set the Height property of the RadListBox for not breaking the page design (I set it to 150px). And the scroll bar appears. An item which will not be seen if the user doesn't scroll the scroll bar of the RadListBox to the bottom is set as checked (for example, the 48th item is selected). If now I click a button to make the page postback. The selected item will then be set unchecked, which is not what I expected. But if I set the 3rd item as checked (This item will be shown even if the user doesn't scroll the scroll bar), the item checked before is still be checked after postback, and this is correct.
If I scroll to the bottom and manually check the 48th item, the 48th item will still be checked after postback, and this is also correct.
Is this a bug of the RadListBox? Or am I missing something?

Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 18 Jan 2010, 12:51 PM
Hello Dylan Lin,

I am unable to reproduce the issue on my side. I have created sample project that follows the scenario you have described. Can you reproduce the issue on the attached sampel? If so, can you enlist the exact steps to reproduce the bug?

All the best,
Genady Sergeev
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
Dylan Lin
Top achievements
Rank 1
answered on 18 Jan 2010, 02:15 PM
I downloaded your code, but the problem still exists.
I think it might be a bug of the control, because I'm not using the latest version of Telerik control, the project started before the latest version released. The version I'm using is "2009.2.701.35" (may be Q2? I'm not very sure).
Finally, I find a solusion to work around: I loop throught all the checked items of the ListBox; uncheck() them, and then check() them again in onClientLoaded event handler.
Thanks all the same! :-)
0
Genady Sergeev
Telerik team
answered on 19 Jan 2010, 09:10 AM
Hi Dylan Lin,

You are right, this bug as well as some other problems exist on the Q2 version of the RadListBox. I strongly recommend that you upgrade to the latest version of the controls. You will find this issue as well as some other problems fixed on the Q1 version of the RadListBox.

Kind regards,
Genady Sergeev
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
ListBox
Asked by
Dylan Lin
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Dylan Lin
Top achievements
Rank 1
Share this question
or