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

RadListBox CheckBox in ItemTemplate does not maintain state on postback

3 Answers 218 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 18 May 2010, 11:31 PM
Hello,

I have a RadListBox which has a number of CheckBoxes and other controls in an ItemTemplate. Since migrating from 2009 Q3 to 2010 Q1, I've realized that the state of the CheckBoxes is no longer being maintained on PostBack.

Initially I created a small separate project to try and isolate the problem, but realised when I switch back to 2009 Q3, then the state is being maintained as expected.

Is this a known issue? Is there a work around?

Thanks,

David

3 Answers, 1 is accepted

Sort by
0
Accepted
Genady Sergeev
Telerik team
answered on 20 May 2010, 09:15 AM
Hello Dave,

This is not a known issue, however I've managed to reproduce it using standard ASP.NET CheckBox. The problems seems to show up in the Q1 Service Pack 1 version (This is 2010.1 415). I have checked both Q3 and Q1 and they seem to work okay. Which version did you test? The good news are that with the latest service pack (which was release yesterday) the problem is gone. We suggest that you upgrade to the latest service pack.

If your issue is not resolved in the service pack please paste here your RadListBox declaration as well as the exact item template so that we can research the problem locally.


Greetings,
Genady Sergeev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Xavi
Top achievements
Rank 1
answered on 03 Jun 2010, 04:16 PM
I have the latest version and a similar problem. Have an ItemTemplate with Checkboxes and RadioButtons in it. Reorder is enabled only client-side. If I check/uncheck the Checkboxes or Radio Buttons and move their ListItem, they will not retain their state after postback. I understand where the issue is here: after postback RadListBox assigns a new id to the controls in the moved ListItem so the controls can no longer load their state from Viewstate. Is there a way around this?

Thanks,
0
Genady Sergeev
Telerik team
answered on 07 Jun 2010, 12:56 PM
Hello Xavi,

RadListBox does not support scenarios where templates are used and client-side reordering takes place. If you want to use templates you need to postback to the server either using ajax or with a normal postback. I suggest that you set the AutoPostbackOnReoder property to true and place the RadListBox inside AJAX panel in order to minimize the overhead.

Best wishes,
Genady Sergeev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ListBox
Asked by
Dave
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Xavi
Top achievements
Rank 1
Share this question
or