Re: Remove Duplicate items from a ComboBox How?

ashwinims

Newcomer
Joined
Mar 13, 2012
Messages
1
Re: Remove Duplicate items from a ComboBox How?

hi,
am using .net framework 3.5. in load,am taking values from 2 tables to one combobox. and i call values from combobox same values are repeated i think its bcz of calling from 2 tables. plz tell how to remove duplicate values in it..
Thank u

Note from moderator: Please place new questions in their own topics. If there is another relevant topic you would like to reference, include a link to it. Thanks!
 
Last edited by a moderator:
Re: Remove Duplicate items from a ComboBox How?

Did you do a search of the forum?

I did and found some code in this post (don't know what ..Net framework it goes with).

Make sure the DataSource property is not set though, or else.

If that code doesn't work for you try the code on this page.
 
Re: Remove Duplicate items from a ComboBox How?

write a sql query which you want to use to fill combo in that use UNION and then bind it to the combo

for example: (select empname from employeemaster) union (select empname from empdetails)

then using datareader or dataset bind the values.
 
Back
Top