Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Form Updates

Posted on 2006-07-21
6
188 Views
Last Modified: 2010-04-23
I have a form that has a dat grid on it with a lot of information. When you select any row a second form comes up and allows you to make changes to the form. Once they hit updat I would like the data grid on the first form to be updated with the new data. I have the data grid code in a function call and it works fine. Please help.

Thanks
0
Comment
Question by:mwhodges
  • 3
  • 3
6 Comments
 
LVL 17

Expert Comment

by:ZeonFlash
ID: 17155163
When you are opening the "Update" form, how are you passing the row information to the form?  Are you sending the values of the each of the row cells, or are you passing the dataset/datatable/datarow?
0
 

Author Comment

by:mwhodges
ID: 17155181
I am passing the identyfing information and performing another qury he second form because there is more data then on the data grid that I am trying to display here. The first form while large is a summary of sorts.
0
 
LVL 17

Expert Comment

by:ZeonFlash
ID: 17155504
A few more questions:
-Does the update form need to stay open, and by this, does the user need to be able to change something, hit Update, change something, hit Update again, etc?
-Are you looking to refresh the entire grid, or just the row that was updated?
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:mwhodges
ID: 17155537
The entire grid would be ok. The 1st form is staying open I am showing the 2nd form in a show dialog.  THey will choose a row in the data grid the 2nd form is shown with all the information in it. They would make their changes hit update and the 2nd form would close and the data grid would be updated.
0
 
LVL 17

Accepted Solution

by:
ZeonFlash earned 400 total points
ID: 17156120
Sounds easy enough :).  Which part are you missing?  

-------------Datagrid Form---------------
    Private Sub DataGrid1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.Click
        dim frmUpdateForm as New UpdateForm(value, value, ...)
        frmUpdateForm.ShowDialog()

        'Upon reaching here, the Update form has been "closed", so refresh the grid
        RefreshDataGrid()
    End Sub

    Private Sub RefreshDataGrid()
      'Code to populate the Datagrid
    End Sub
-------------------------------------------

-------------Update Form---------------
    Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
        'Database update code here

        Me.Hide()
    End Sub
-------------------------------------------
0
 

Author Comment

by:mwhodges
ID: 17156735
Sweet... I didnt know that the showdialog box freezes the code until it regains focus. Thanks a bunch.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question