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

Selecting multiple items from code

5 Answers 158 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.
Amanda
Top achievements
Rank 2
Amanda asked on 20 May 2009, 12:36 PM
How do i select multiple items from code in a list box or combo box?

5 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 21 May 2009, 08:36 AM
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.
0
Mario
Top achievements
Rank 1
answered on 13 Jan 2010, 04:59 PM
Hello Guys,

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

Let me know if its on the newest version

Thanks
0
Nick
Telerik team
answered on 14 Jan 2010, 08:23 AM
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.
0
Mario
Top achievements
Rank 1
answered on 14 Jan 2010, 02:42 PM
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
0
Veselin Vasilev
Telerik team
answered on 19 Jan 2010, 11:47 AM
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.
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
Amanda
Top achievements
Rank 2
Answers by
Nick
Telerik team
Mario
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Share this question
or