Move DataGrid Row to Another DataGrid

G

Guest

I have a form with two DataGrid controls, each bound to different tables in a dataset. I would like to be able to have the user click a button, and have the currently highlighted row in datagrid1 copy over to datagrid2 as a new row.

Is that possible? I have been playing around with different things and cannot figure out how to do this...

Thanks in advance for your help,

Jason
 
P

Paul Wilson

Why not try this,

Dim loRow as Row
loRow.ItemArray = loTable.Rows(<Row Index Number>).ItemArray

(this way you don't have to populate the values of each column in the row
one by one, the ItemArray will handle it for you).

Now, use loRow as you please.

Best Regards,
Paul

jgrimsman said:
I have a form with two DataGrid controls, each bound to different tables
in a dataset. I would like to be able to have the user click a button, and
have the currently highlighted row in datagrid1 copy over to datagrid2 as a
new row.
Is that possible? I have been playing around with different things and
cannot figure out how to do this...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top