4
我得到一个文本框,并使用数据绑定到一个对象。这工作得很好,直到我尝试选择新的产品:数据绑定到对象 - 如何更新对象/绑定?
product = new Product(id);
textbox.DataBindings.Add("Text", product, "ProductName");
// After user action:
product = new Product(newId); // <- the textbox isn't updated
我必须清除数据绑定和产品更新后重新设置呢?