Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataSet Haschanges returning false
Message
 
To
28/10/2012 09:43:22
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01554541
Message ID:
01556059
Views:
48
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform