0

Hi,
I am new to VB.NET, so please bear with me.

I have a form with 2 datagrids. The first datagrid displays data from a dataset (ds1). Now based on certain criteria that the user selects from the textboxes and after clicking a button "Get Data", I need to loop thru the dataset (ds1) and populate a new dataset (ds2) with only selected records and display this in the second datagrid.
i.e. ds1 may contain 1000 records, but based on the conditions entered by the user, I need to parse the 1000 records and only select may be 5 records and populate these 5 records in the second dataset

I am able to populate the first dataset. But I am not able to figure out how to populate the second dataset row by row.

Can you please help
Thanks
- Artee

2
Contributors
1
Reply
3
Views
10 Years
Discussion Span
Last Post by Ravalon
0

You want to do some research on master/child databinding relationships. It sounds long and complex, but it's really not that hard. :) You end up doing something like this with BindingSource objects.

bsMaster.DataSource = MyDataSet;
bsMaster.DataMember = "MasterKey";

bsChild.DataSource = bsMaster;
bsChild.DataMember = "ChildKey";

gridMaster = bsMaster;
gridChild = bsChild;
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.