Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RejectChange
Message
From
03/12/2004 20:51:12
 
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
00966480
Message ID:
00966883
Views:
8
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
Previous
Reply
Map
View

Click here to load this message in the networking platform