ListBox inside ascx Control on RadMultiPage

2 posts, 0 answers
  1. Rory
    Rory avatar
    159 posts
    Member since:
    Jul 2007

    Posted 07 May 2012 Link to this post

    Our RadListBox is adding items on clientside which uses TrackChanges and CommitChanges to persist the client side entries. However if our RadMultipage has RenderSelectedPageOnly="true" then going from one tab to the next loses all of the client side entries except the first list item that was added. Strange issue that can be fixed by setting the RadMultiPage's  RenderSelectedPageOnly="false" unfortunately this setting results in horrible loading performance for the RadMultiPage.

    I am also seeing an error after deleting items from the RadListBox and trying to navigate to a new tab. This is the error:
    "Line: 6
    Error: Sys.WebForms.PageRequestManagerServerErrorException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index"

    Please Advise. 
    Rory Haynie
  2. Rory
    Rory avatar
    159 posts
    Member since:
    Jul 2007

    Posted 09 May 2012 Link to this post

    I was able to fix the re-order and delete not persisting issue and created a workaround for the items added not persisting issue.

    To fix re-order not persisting I set:

    To fix deletes not persisting I set:

    To fix RadListBoxItems added in javascript not persisting:
    I created a HiddenField where I stored the list of items in the RadListBox and on TabClick event when I was losing my items I repopulate the listbox from the HiddenField.

    Telerik I suggest you add an AutoPostBackOnAdd because the "TrackChanges" and "CommitChanges" doesn't work in this scenario. Hope this helps someone.



  3. DevCraft R3 2016 release webinar banner
Back to Top