Tuesday, 8 June 2010

Issues with NumericUpDown Databinding

After setting up a form using databinding, I realised that my NumericUpDown controls were not properly updating the underlying object if a value was changed, and the user 'tabbed out', but they would work correctly if the user clicked into and out of the control!

numericUpDown.DataBindings.Add("Value"m_InventoryItems, "UnitCost"TrueDataSourceUpdateMode.OnPropertyChanged)

Thanks to TonyG for sharing the answer.

No comments:

Post a Comment