By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,581 Members | 1,990 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,581 IT Pros & Developers. It's quick & easy.

Filter a ComboBox Data Source

P: n/a
Hello,

My Problem.

I have 2 classes
ClsEnterprise
ClsUser

The ClsEnterprise has property :
Id_Ent
Name
.....

The ClsUser has property :
Id_User
Name
Id_Ent
.....

and 2 others Classes
ClsEnterprises as list (of ClsEnterprise)
ClsUsers as list (of ClsUser)
I have 2 combo box
CboUser
CboEnterprise
To fill the combo
CboUser.DataSource = ClsUsers
CboUser.DisplayMenber ="Name"
CboUser.ValueMember = "IdUser

CboEnterprise.DataSource = ClsEnterprises
CboEnterprise.DisplayMenber ="Name"
CboEnterprise.ValueMember = "IdEnterprise

When I select an enterprise in the CboEnterprise I would like only to
show Users from this enterprise
How can i do???
I tried this but it doesn't work:
Dim Result = From Usr In Users() Where Usr.Id =
CboReseaux.ValueMember
CboUser.DataSource = Result

Aug 10 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.