C
Chuck Bowling
i have a form with a couple of textboxes bound to a collectionbase object.
The code looks like this:
txtName.DataBindings.Add(new Binding("Text", instrumentSet, "Name"));
txtComment.DataBindings.Add(new Binding("Text", instrumentSet, "Comment"));
Maybe I'm looking at things the wrong way but intuitively I'd think that the
binding goes both ways. That is, when I change the text in the textbox it
should automatically change the contents of the object it's bound too. I
know it'd be easy to update the source with an OnChanged event but somehow I
get the feeling that I might be doing something wrong. Can somebody clue me
in here?
The code looks like this:
txtName.DataBindings.Add(new Binding("Text", instrumentSet, "Name"));
txtComment.DataBindings.Add(new Binding("Text", instrumentSet, "Comment"));
Maybe I'm looking at things the wrong way but intuitively I'd think that the
binding goes both ways. That is, when I change the text in the textbox it
should automatically change the contents of the object it's bound too. I
know it'd be easy to update the source with an OnChanged event but somehow I
get the feeling that I might be doing something wrong. Can somebody clue me
in here?