How to capture the value change of numericUpDown ctrl real-time in .NET?
- by Carlos_Liu
I have implement the ValueChanged event, but I found it will be triggered only after change the focus from numericUpDown to other control or by clicking the up/down arrow.
Inputting the value in the control will not trigger ValueChanged event.
What I did now is adding an KeyDown event and judge if the input value is numeric (can not include SHIFT/CTRL/ALT key); but there is another case need to be involved: the user can paste value into the numericUpDown ctrl
What I need is :
When I was typing numeric value (only numeric) in the numericUpDown ctrl, it will known the content has been changed;
When pasted a numeric value into the ctrl, it also kowns the content changed