473,382 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Filter a ComboBox Data Source

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
0 1238

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: google | last post by:
This is something I've done plenty of times in '97, but I can't seem to get it to work correctly in Access 2003. Say, for example, I have a form with an unbound combobox, the data source is a...
3
by: Bill C. | last post by:
Hello, I know this has been discussed a lot already because I've been searching around for information the last few weeks. I'm trying to implement a DataGridComboBoxColumn class. I've found...
3
by: PeterZ | last post by:
G'day, After doing much searching and pinching bits of ideas from here there and everywhere I came up with a fairly 'clean' solution of including a comboBox into a dataGrid column. You can...
3
by: Vern | last post by:
The following code retrieves data into a dataset, and then creates a dataview with a filter. This dataview is then attached to a combobox. When the effective date changes, I would like to see the...
3
by: Craig G | last post by:
are there any decent 3rd Party Comboboxes/DropDownLists for ASP.NET that will allow users to enter data into them like in VB.NET? basically i want a combobox that i can populate with a list of...
4
by: Bo Diddly | last post by:
This is what I've done so far: I have a DataBase with: tblBook BookID... key Book... All the book titles of the Bible tblChapter ChapterID... key Chapter... chapter numbers (1 - 150)
2
by: Daylor | last post by:
hi. i have 2 combobox on form. after i load the form. when i select the first combobox , i want to filter the datatable that attached to the second combobox. i wrote :
1
by: fiaolle | last post by:
Hi The first set of source code is the class for a combobox in a grid, hopefully. In the second set of code we try to use the combobox class, but the grid is empty. I don't understand how this...
11
by: billa856 | last post by:
Hi, I have project in MS Access.In that I have one form in which there is one combobox .I want to know when I select an item from that combobox and click on submit button then it should open a...
1
by: BSTAFFORD | last post by:
I need help. I have a form with a 5 comboboxes. the form also contains a subform query with the saved records from those 5 combobox categories. What I'd like to happen is as a new record is...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.