Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update the Dataset
Message
De
21/06/2007 21:40:11
 
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01233541
Message ID:
01234905
Vues:
14
Gregorio,

You have to do something *before* you do the Me.Depts_LookupDataSet.GetChanges().It may be as simple as:
MyBindingSource.EndEdit() 'I don't remember what you called your BindingSource
Me.Depts_LookupDataSet.GetChanges()
If this doesn't work, I have other ideas. Let me know.

~~Bonnie



>Bonnie:
>
>I have three form, that I have the same problem. but the code for the check box in the grid I have to recoded and I dont have the original code that was causing the problem.
>
>But, this code basically is what I made in the method changedcell ,
>
>Private Sub Grid_doubleClickHeader(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.DoubleClickHeaderEventArgs) Handles Dept_Grid.DoubleClickHeader
> Dim Cvalue As String
> Dim drdepts As DataRow
> Dim I As Integer
> Dim rposition As CurrencyManager
>
> rposition = CType(Me.BindingContext(Me.Depts_LookupDataSet.Depts_Lookup), CurrencyManager)
> Me.Depts_LookupDataSet.GetChanges()
> rposition.Position = 0
> I = 0
> Cvalue = e.Header.Column.ToString
>
> If Cvalue = "lsele" Then
> For Each drdepts In Me.Depts_LookupDataSet.Tables(0).Rows
> If drdepts("lsele") = True Then
> I = I + 1
> End If
> Next drdepts
>
>
> If I = 0 Then
> Me.Edit_btn.Enabled = False
> Me.Del_btn.Enabled = False
> checkcount = 0
>
> Else
> Me.Edit_btn.Enabled = True
> Me.Del_btn.Enabled = True
> checkcount = Me.Dept_Grid.Rows.Count
>
> End If
> End If
> End Sub
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform