RadListBox CheckBox in ItemTemplate does not maintain state on postback

4 posts, 1 answers
  1. Dave
    Dave avatar
    11 posts
    Member since:
    Apr 2009

    Posted 18 May 2010 Link to this post

    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
  2. Answer
    Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 20 May 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Xavi
    Xavi avatar
    2 posts
    Member since:
    Jun 2009

    Posted 03 Jun 2010 Link to this post

    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,
  5. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 07 Jun 2010 Link to this post

    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.
Back to Top