Select to view content in your preferred language

combobox with no repeated items

637
2
05-26-2012 03:24 PM
YassineEL_JADIDI
Deactivated User
Hello,
i have a combobox that i fill it with data from service domain, but i dont want repeated items in this combobox.
any idea please ?
0 Kudos
2 Replies
DominiqueBroux
Esri Frequent Contributor
i have a combobox that i fill it with data from service domain, but i dont want repeated items in this combobox.


You have to eliminate the duplicates by yourself when setting the ItemsSource.

Something like myComboBox.ItemsSource = myItemsSource.Distinct();  which will use the default equality comparer to compare values.

If you need to define your own equality comparer, you can use this distinct overload : http://msdn.microsoft.com/en-us/library/bb338049(v=vs.95).aspx
0 Kudos
YassineEL_JADIDI
Deactivated User
thnx for your reply but the problem that i use RIA.
so my combobox items ource is my database, i just created a combobox and i draged the data from the field ot the table in domain service.
i hope you understand what i mean !
0 Kudos