| | | Forum Newbie
       
Group: Forum Members Last Login: 1/15/2010 12:04:30 PM Posts: 5, Visits: 9 |
| | Hello Everyone, I have two forms. I am enetering the values to be saved in the database in one form and another form is displaying those values in a DatagridvIew.Eything is working except that when I eneter the value on first form and hit the save botton, the values are not reflected immediatley on my second form datagridview. Although when I hit the save button on the first form, immediatley after that I am rebinding my datagridview again and I am Refreshing the datagridview and also the form itself, but nothing seems to be working. Can anyone help me with that. Below is my code that has the datgridview Private Sub bindGrid(ByVal dv As DataView) Try Dim ChatsChild As New edsChild Dim dt As New DataTable dt = dv.ToTable() grdPreviousCases.DataSource = dt grdPreviousCases.Refresh() Me.Refresh() Catch ex As Exception End Try End Sub below is the code of the form that lets me save the data If saveCase( cmbRegion.Text, txtNameLast.Text, txtNameFirst.Text, txtNameLast2.Text, txtNameFirst2.Text, txtPhone1.Text) Then { PreviousCases.setUpdateStatus(1) PreviousCases.Refresh() Close() } PrevousCases is my second form name. PreviousCases.setUpdateStatus(1) calls the bindGrid method. Can anyone help me with this. I might be missing somethig here or may be it is not possible to refresh the form at all. |
| | | | 
Forum God
       
Group: Forum Members Last Login: 2/24/2010 10:21:15 AM Posts: 632, Visits: 1,016 |
| | From what I read you're using a datagrid. (?) Most database-bindable controls have a "databind()" method. Try using this.
-Mobius |
| |
|
|