Link to home
Start Free TrialLog in
Avatar of BlakeMcKenna
BlakeMcKennaFlag for United States of America

asked on

Modifying form data and showing reflected change in another form at same time???

I have a program where I have one form that contains a DataGridView which is bound to a SQL Server Table. When the user selects a row from the grid...another form (maintenance form) will pop up containing the data from the grid. The user will then make changes to the data and then save the data and have it immediately reflect the changes in the grid on the first form.

Unfortunately, I'm not sure how to code for this in the maintenance form.

What I'm thinking is that I need to make a reference to the dataset object (linked to the grid), in the maintenance form where I make the changes. I was thinking of something like this.


'The following Event is in the Maintenance Form
Private Sub btnSave_Click()
       'Make a reference to the Form containing the Grid
       frmProducts.dsEmployee.Tables(0).Rows(?).Item("Category") = cmbCategory.Text
End Sub

dsEmployee is the DataSet bound to the grid.

I hope I've explained myself adequately.

Thanks,
Avatar of Christopher Kile
Christopher Kile
Flag of United States of America image

I suggest you review this article and some of the articles it links in its footnotes:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconDataSets.asp
ASKER CERTIFIED SOLUTION
Avatar of kumar_jac
kumar_jac
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial