distinct value in the drop down

Posts   
 
    
nirupama
User
Posts: 2
Joined: 13-Jul-2005
# Posted on: 13-Jul-2005 11:26:36   

how to get the distinct value in a dropdownList in c#.net

i am using c#,SqlServer,LLBLGenPro. Plz reply as soon as possible.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 13-Jul-2005 12:24:14   

Create a dynamic list, please see the documentation on typed lists/views in the using the generated code /adapter/selfservicing section, which contains an example about how to create dynamic lists.

for drop down lists, you basicly create a ResultsetFields object of 2 fields (name and value) and when fetching it, specify false for 'allowDuplicates' in either GetMultiAsDataTable() (selfservicing) or FetchTypedList (adapter). As you haven't specified what you use (selfservicing or adapter) I can't provide you with an example.

Also please see: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=1522

Frans Bouma | Lead developer LLBLGen Pro