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

RadListBox Items value in a loop

3 Answers 173 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sheraz Naseeb
Top achievements
Rank 1
Sheraz Naseeb asked on 29 Jul 2010, 05:49 PM
Hi Telerik Team,

I was struggling with the RadListBox like how to add items from left ListBox to right ListBox having their Values with them, fortunately I have managed to do that but now I wanna select the value from the right ListBox but I couldnot find any way to do so. I am looking for something like as follows:

        Dim LText As New List(Of String)
        Dim LValue As New List(Of Integer)

        For i = 0 To lstSelected.Items.Count - 1
            LText.Add(lstSelected.Items(i).Text)
            LValue.Add(lstSelected.Items(i).SelectedValue)
        Next i

but this functionality does not seem to be there.

Please help me if there is any way I can do that??

Many thanks,
Sheraz

3 Answers, 1 is accepted

Sort by
0
Sheraz Naseeb
Top achievements
Rank 1
answered on 02 Aug 2010, 06:35 PM
Can I have any reply from any member of the support team on above issue please.... ????

It is important for me....
0
Sheraz Naseeb
Top achievements
Rank 1
answered on 02 Aug 2010, 06:38 PM
Its almost 5 days I have posted this issue on this website but no one bothered to reply or anything....
0
Victor
Telerik team
answered on 03 Aug 2010, 10:27 PM
Hello Sheraz Naseeb,

Thank you for your question.

Before addressing it, we would like to note that all Forum posts are treated with 72 hour response times (Mon - Fri), and that we do not guarantee that we reply to all Forum posts. If you would like to get faster responses, please use the support ticketing system, which assigns a guaranteed response time, depending on your license. The support options are described here if you require further details.

Regarding your question, RadListBoxItem objects cannot simply be moved from one RadListBox to another in bound mode. In bound mode the Value property contains the value of the property pointed to by RadListBox's ValueMember string and moving items from one list box to another can produce undefined behavior.

In unbound mode you can use the Value property of each item in order to store a value or some other relevant information. You can transfer items between list boxes only in unbound mode. In the code snippet you provided you simply need to remove the part that gets the SelectedValue property and get Value instead.
 
Please write again if you have other questions.

Kind regards,
Victor
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
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
Sheraz Naseeb
Top achievements
Rank 1
Answers by
Sheraz Naseeb
Top achievements
Rank 1
Victor
Telerik team
Share this question
or