[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Form Updates

Posted on 2006-07-21
6
Medium Priority
?
193 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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 1600 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses
Course of the Month20 days, 7 hours left to enroll

868 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