Selecting multiple items from code

6 posts, 0 answers
  1. Amanda
    Amanda avatar
    173 posts
    Member since:
    Sep 2007

    Posted 20 May 2009 Link to this post

    How do i select multiple items from code in a list box or combo box?
  2. Nick
    Admin
    Nick avatar
    767 posts

    Posted 21 May 2009 Link to this post

    Hi mmassey,

    You cannot select multiple items in RadComboBox by default however you can follow this code library if you want to implement a custom solution.

    As to the RadListBox, there is multi select functionality. Here is a sample about selecting the first and the third item using code:

    private void radButton1_Click(object sender, EventArgs e) 
        this.radListBox1.SelectionMode = SelectionMode.MultiSimple; 
        this.radListBox1.SelectedIndices.Add(0); 
        this.radListBox1.SelectedIndices.Add(2); 
     
    You can also use this.radListBox1.SelectedItems collection to select items instead of indices

    I hope this helps. Please do not hesitate to write us back if you have further questions.

    All the best,
    Nick
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Mario
    Mario avatar
    24 posts
    Member since:
    Apr 2009

    Posted 13 Jan 2010 Link to this post

    Hello Guys,

    I dont see any class called RadListBox available in my Telerik distribution

    Let me know if its on the newest version

    Thanks
  5. Nick
    Admin
    Nick avatar
    767 posts

    Posted 14 Jan 2010 Link to this post

    Hi Mario,

    Thank you for contacting us. This is really strange. RadListBox is one of our controls and it is present in our latest distribution and every other our release. Have you included Telerik.WinControls.UI.dll to your project?

    Sincerely yours,
    Nick
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Mario
    Mario avatar
    24 posts
    Member since:
    Apr 2009

    Posted 14 Jan 2010 Link to this post

    Hello Nick,

    I see the issue, Im in the wrong section of the forum, I need the radlistbox for the web (ASP control) 

    Im currently using the Telerik.Web.UI (2009.1.311.35)

    So is this control currently suported only for Windows Applications?

    Let me know

    Thanks
  7. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 19 Jan 2010 Link to this post

    Hi Mario,

    RadListBox for ASP.NET Ajax is added in Q2 2009 release (version 2009.2.701) so you need to have that or a newer version.

    For any questions about the Ajax controls - please use the appropriate forums.

    Thank you

    Best wishes,
    Veskoni
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for WinForms is Visual Studio 2017 Ready