views:

229

answers:

1

Hi. I have a databinding like this:

    numericUpDown1.DataBindings.Add("Value", myBox1, "Width");

Whenever myBox1.Width changes it will update numericUpDown1.Value.

The problem is when entering new numbers on the control, myBox1.Width will not be updated immediately, but only after the cursor leaves the text area of the control. Is there any workaround to this bug? Thanks!

+3  A: 

Change the code like this:

numericUpDown1.DataBindings.Add("Value", myBox1, "Width", DataSourceUpdateMode.OnPropertyChanged);
Giorgi
There's no matching signature but numericUpDown1.DataBindings.Add("Value", myBox1, "Width", false, DataSourceUpdateMode.OnPropertyChanged) works like a charm. Thanks!
Dan7
You are welcome
Giorgi