Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid and textbox not in sync
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00967844
Message ID:
00967854
Vues:
13
Hi Hector,

Now I cant get the textbox to actually update the database (sheesh! < g >).

I was able to fix the sync problem with the line
txtContent.DataBindings.Add("text", Methods1.Tables("ExtraMethods"), "Content")
I have tried the following in both the LostFocus and the close of the form
If Methods1.HasChanges Then
   Methods1.AcceptChanges
End If

and 

Dim oChanges as DataTable = Methods1.Tables("ExtraMethods").GetChanges()
If Not oChanges Is Nothing Then
   oChanges.AcceptChanges()
End If
Any ideas??



>Make sure they are both bound to the same object. What I mean is that, since there are several ways to bind to the grid, is that sometimes .NET does not realize that both of them are bound to the same object.
>
>Could you post the lines of code that do the binding for the textbox and the grid?




>>I dropped a grid and a textbox onto a form, I bind the grid to a SQL Server table and i bind the textbox to a text field in the table.
>>
>>The grid fills fine and so does the text box, but when I navigate to a different row in the grid, the textbox is still bound to the original row
>>
>>TIA,
>>
>>Rick
>
Rick Hodder
MCP Visual Foxpro
C#, VB.NET Developer
Independent Consultant
www.RickHodder.com
MyBlog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform