开发者

DataBinding feedback in .NET2

I have a object myObject.Name in a Form1 with a textBox1 In the Form1_Load I do:

this.TextBox1.DataBindings.Add("T开发者_Python百科ext", myObject, "Name");

When validating the textBox I have myObject.Name changed. This is OK.

Now I modify internally in myObject _name = "changed value", but myTextBox text will not change. so... how to do it on both directions, from and to the textBox1?


Your object needs to implement INotifyPropertyChanged so that the data binding knows that your object changed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜