Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

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

Avatar of BlakeMcKenna
BlakeMcKennaFlag for United States of America asked on
Programming
2 Comments1 Solution260 ViewsLast Modified:
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,
ASKER CERTIFIED SOLUTION
Avatar of kumar_jac
kumar_jacFlag of India image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answers