Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataSet Haschanges returning false
Message
 
À
28/10/2012 09:43:22
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01554541
Message ID:
01556059
Vues:
47
Hi all, just to update you on what I ended up coding ( please advise if there's a cleaner way )
// This method clears the controls values.

this.txtFirstName.Text = "";
this.txtMiddleName.Text = "";
// And so on for the other controls.

// Loop to WriteValues to dataset

for(int i = 0 ; i < this.Controls.Count ; i++)
    if(this.Controls[i].DataBindings.Count > 0)
        for(int j = 0 ; j < this.Controls[i].DataBindings.Count  ; j++)
            this.Controls[i].DataBindings[j].WriteValue();
I thought the whole point of DataBinding was to automate this sort of behaviour. Once again, thanks for your help.
Regards,
Peter J. Kane



Pete
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform