Adding Items to RadListBox Control

Thread is closed for posting
2 posts, 0 answers
  1. cathe
    cathe avatar
    3 posts
    Member since:
    May 2007

    Posted 06 Jun 2007 Link to this post

    I need to add a list of items to a radlistbox control, and I can do it fine with the MS version, but this does not work.  I am using the following syntax:


    Can anyone give me some examples please? 

    Thanks in advance..
  2. Georgi
    Georgi avatar
    212 posts

    Posted 07 Jun 2007 Link to this post

    Hi cathe,

    You're trying to use the Add method of the  Items collection with a string parameter. The Items collection is a collection of objects of type RadItem, in your case - objects of type RadListBoxItem. You should always use objects of  type RadListBoxItem or its descendants when you work with Items collection. 

    Your code should be as follows:

    Dim test1 as RadListBoxItem = New RadListBoxItem("test11")

    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top