RadListBox Items value in a loop

4 posts, 0 answers
  1. Sheraz Naseeb
    Sheraz Naseeb avatar
    22 posts
    Member since:
    Mar 2010

    Posted 29 Jul 2010 Link to this post

    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
  2. Sheraz Naseeb
    Sheraz Naseeb avatar
    22 posts
    Member since:
    Mar 2010

    Posted 02 Aug 2010 Link to this post

    Can I have any reply from any member of the support team on above issue please.... ????

    It is important for me....
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Sheraz Naseeb
    Sheraz Naseeb avatar
    22 posts
    Member since:
    Mar 2010

    Posted 02 Aug 2010 Link to this post

    Its almost 5 days I have posted this issue on this website but no one bothered to reply or anything....
  5. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 03 Aug 2010 Link to this post

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