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

how to restrict duplication of items in RadListBox in WinForms Q3 2009 SP1

1 Answer 62 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.
LINSON THOMACHAN
Top achievements
Rank 1
LINSON THOMACHAN asked on 11 May 2010, 02:16 PM
Hi,
i use the RadListBox that comes with WinForms Q3 2009 SP1 in my C# project. One major difficulty i face now is i want to  perform a condition on adding items to the radListBox. i.e, all items must be added only once.no duplication of same item must be present. In the standard listbox of Windows Forms i used if(!listbox1.item.contains(s)) to enter a string s, but i need to know how to implement this using RadListBox.

1 Answer, 1 is accepted

Sort by
0
Dobry Zranchev
Telerik team
answered on 14 May 2010, 02:26 PM
Hi LINSON THOMACHAN,

Thank you for contacting us. We have the same method in the RadListBox.Items collection
this.radListBox1.Items.Contains(radListBoxItem)

This method accepts a RadListBoxItem instance. If you want to check whether an item has the text that you are looking for, you should create your own method that checks whether the collection contains an item with this text. I hope this will help you.

If you have additional questions, feel free to ask.

Greetings,
Dobry Zranchev
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
LINSON THOMACHAN
Top achievements
Rank 1
Answers by
Dobry Zranchev
Telerik team
Share this question
or