createing a combobox to use as filter

pachjo

Well-known member
Joined
Dec 12, 2006
Messages
370
Programming Experience
10+
I have a number of comboboxes and a datagridview on a form.

the datagridview displays the entire table.

i want each combobox to display grouped details from the datagridview so that the user could for example select the username from the username combobox click refresh and the datagridview will refresh to display only those entries for the selected username.

I know how to get a combobox to do this in access, set the datasource to a query but not in in vb.net

any pointers please?
 
Make a query on a tableadapter, that groups the table.

SELECT whatever FROM table GROUP BY whatever

Dont make a Fill, just a GetData. Then the combo code setup is:

combo.DataSource = myTableAdapter.GetDataGroupedWhatever()
 
Back
Top