Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RejectChange
Message
De
03/12/2004 20:51:12
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00966480
Message ID:
00966883
Vues:
7
Hey Stephane,

To add to Hector's reply (it is CurrencyManager-related, or BindingContext-related ... they are basically similar things). Anywho, the problem is that the current edit has not been ended. Probably the easist thing to do is to call the EndCurrentEdit() method right before you do the RejectChanges() (this should also be something you'll want to do before you Save):
this.BindingContext[Table1].EndCurrentEdit();
Table1.RejectChanges();
That should do the trick.

~~Bonnie


>I'm doing a RejectChange() on a DataTable and the controls bounded to it to not refresh with the old data. If i redo the binding for the control, the binding is fine.
>
>there's probably things i'm not doing right...?
>
>Here a bit what i'm doing:
>
>
>textbox.Bindings.Add("Text", Table1, "Name");
>textbox.Text = "Some new data";
>Table1.RejectChange();
>// testbox does not refresh...
>textbox.Bindings.Clear();
>textbox.Bindings.Add("Text", Table1, "Name");
>// textbox now contains the old data.
>
Bonnie Berent DeWitt
NET/C# MVP since 2003

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

Click here to load this message in the networking platform