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

ListBox inside ascx Control on RadMultiPage

1 Answer 63 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Rory
Top achievements
Rank 1
Rory asked on 07 May 2012, 11:14 PM
Hi,
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

1 Answer, 1 is accepted

Sort by
0
Rory
Top achievements
Rank 1
answered on 09 May 2012, 06:53 PM
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:
AutoPostBackOnReorder="true"

To fix deletes not persisting I set:
AutoPostBackOnDelete="true"

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.

Adios,
Rory

 

Tags
ListBox
Asked by
Rory
Top achievements
Rank 1
Answers by
Rory
Top achievements
Rank 1
Share this question
or