Undo in TextBox

M

Marco Liedekerken

Hi,

If a user enters a wrong value (which depends on some properties of it's
container control) in one of my dynamicly made TextBoxes I want to undo the
change he made to the Text property of the TextBox.
I think some possible ways are:
- Use a Validation control. This will be difficult because I generate
multiple TextBoxes dynamicly and they have different validationrules.
- Do something in the TextChanged handler. This is preferred and simple
but maybe this is impossible.
- Add a property to the TextBox control which remembers the previously
entered value.
- .....

My first question is: how can I do the undo the best way?
My second question is: is there a possibility to retrieve the previous
entered value in the TextChanged handler?

Thanks, Marco
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top