serhio
serhio

Reputation: 28586

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("Text", 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?

Upvotes: 0

Views: 32

Answers (1)

Lucero
Lucero

Reputation: 60276

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

Upvotes: 1

Related Questions