From: Mr. X. on
Hello.
I have connected textbox by databinding to a BindingSource object (to a
specific column of a specific table).

Everything is fine ...
But what if I want to undo the change I have made by the textbox.
(It may be a textbox or any other binded control).
How can I do that ?

Thanks :)

From: Cor Ligthert[MVP] on
Use instead of Add, Remove (or clear it what mostly is the most simple)

"Mr. X." <nospam(a)nospam_please.com> wrote in message
news:uR8EmRN1KHA.5212(a)TK2MSFTNGP05.phx.gbl...
> Hello.
> I have connected textbox by databinding to a BindingSource object (to a
> specific column of a specific table).
>
> Everything is fine ...
> But what if I want to undo the change I have made by the textbox.
> (It may be a textbox or any other binded control).
> How can I do that ?
>
> Thanks :)

From: Mr. X. on
"Cor Ligthert[MVP]" <Notmyfirstname(a)planet.nl> wrote in message
news:OhQCfVO1KHA.4412(a)TK2MSFTNGP02.phx.gbl...
> Use instead of Add, Remove (or clear it what mostly is the most simple)

I don't understand.
What this is related to undo my changes (of only field of the table).

Thanks :)

From: Cor Ligthert[MVP] on
Textbox1.DataBindings.Clear
Textbox1.DataBindings.RemoveAt(0)
Textbox1.DataBindings.Remove(Textbox.Datatindings(0))

"Mr. X." <nospam(a)nospam_please.com> wrote in message
news:u3WkElP1KHA.5972(a)TK2MSFTNGP06.phx.gbl...
> "Cor Ligthert[MVP]" <Notmyfirstname(a)planet.nl> wrote in message
> news:OhQCfVO1KHA.4412(a)TK2MSFTNGP02.phx.gbl...
>> Use instead of Add, Remove (or clear it what mostly is the most simple)
>
> I don't understand.
> What this is related to undo my changes (of only field of the table).
>
> Thanks :)

From: Michel Posseth [MCP] on

Just call reject changes on the dataset , datatable or datarow ( what is
apropriate in your situation )
http://msdn.microsoft.com/en-us/library/afybt7wb.aspx

the datasource will through the bindingsource reflect the old values to the
screen


HTH

Michel Posseth


"Mr. X." <nospam(a)nospam_please.com> schreef in bericht
news:uR8EmRN1KHA.5212(a)TK2MSFTNGP05.phx.gbl...
> Hello.
> I have connected textbox by databinding to a BindingSource object (to a
> specific column of a specific table).
>
> Everything is fine ...
> But what if I want to undo the change I have made by the textbox.
> (It may be a textbox or any other binded control).
> How can I do that ?
>
> Thanks :)