PDA

Click to See Complete Forum and Search --> : Two Datagrid data transfer


NickPra
Oct 3rd, 2002, 12:55 PM
I have two disconnected datagrids (DG1 and DG2). DG1 has col1 and col2, DG2 has col1, col2, col3, col4.

I have to allow the user to edit DG1 first, then add those edits to DG2 (col1 and col2) and then allow the user to edit DG2. example, say the user entered a new row in DG1, i have to add the same row in DG2 (col1 and col2) with col3 and col4 as nulls.

I tried DG2.Merge(DG1), but it does not work. both have the same schemas but different queries.

Dim dssource As New DataSet()
dssource = DG1.DataSource

Dim dstarget As New DataSet()
dstarget = DG2.DataSource

dstarget.Merge(dssource)

is this wrong?