Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

filtering a Dataset

Status
Not open for further replies.

JScannell

Programmer
Jan 9, 2001
306
0
0
US
Hi all,

I've created a windows app in vb.net (VS 2010) and I have a dataset filtering problem.

First the schema: I have a parent table (log_entries) primary key log_entries_id and a child table (log_entries_detail) with a foreign key to the log_entries_id. It's a one-to-many relationship.

The columns from the parent table are bound to textboxes and comboboxes.

The data from the child table are placed into a dataGridView.

I have no problem filtering on the parent table which results in correct data results. There is a binding source for the parent table and I set the Filter to a properly formatted string based on what you pick for the 3 possible filter controls.

The problem is how do I perform filtering on the child table such that it impacts the entire parent-child query? A few of the columns in the child table that I would like to filter on are SubCategory and Product. There are BindingSource and TableAdapter controls for both the log_entries and log_entries_detail tables. There is a BindingNavigator for the log_entries table so you can navigate through the entire data set. There isn't a binding source for the detail table, and I doubt that I would need one, so I might need to somehow apply the filter to the datagridview but I don't know what to do.

Any help would be greatly appreciated.

Thanks in advance,

Jerry Scannell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top