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

RadListBox not getting items on postback

2 Answers 104 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Sagar
Top achievements
Rank 1
Sagar asked on 31 Oct 2012, 09:57 PM
Hi All,
             I have the following code:

<telerik:RadListBox runat="server" ID="RadListBox1" AllowReorder="true" Height="350px"
            AllowTransferOnDoubleClick="true" SelectionMode="Multiple" AllowTransfer="true" 
            TransferToID="RadListBox2" Width="300px" EnableDragAndDrop="true" Sort = "Ascending" PersistClientChanges = "true">
        </telerik:RadListBox>
        <telerik:RadListBox runat="server" ID="RadListBox2" Width="300px" Height="350px" AllowTransferOnDoubleClick = "true"
            SelectionMode = "Multiple" EnableDragAndDrop = "true" Sort = "Ascending" PersistClientChanges = "true">
        </telerik:RadListBox>

And in the code behind i have :

For i As Integer = 0 To RadListBox2.Items.Count - 1
-----------------
Next

But the problem is after the postback, the items of radlistbox2 is same as before. All the changes(adding/removing items) are lost. Please help me. Thanks.

2 Answers, 1 is accepted

Sort by
0
Sagar
Top achievements
Rank 1
answered on 01 Nov 2012, 02:43 PM
It is fixed. I am loading them in page_load instead of init.
0
Nencho
Telerik team
answered on 01 Nov 2012, 04:10 PM
Hi Sagar,

I'm glad that you were able to solve the faced issue yourself.

Wish you a great day!


Greetings,
Nencho
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ListBox
Asked by
Sagar
Top achievements
Rank 1
Answers by
Sagar
Top achievements
Rank 1
Nencho
Telerik team
Share this question
or