この問題を解決するにはどうすればよいですか。
private void SetupBindings()
{
MyObj = new MyObjClass();
MyObjSource.DataSource = typeof(MyObjClass);
MyObjSource.Clear();
MyObjSource.Add(new MyObjClass());
txtMyField1.DataBindings.Add(new Binding("Text", MyObjSource, "MyField1", true));
}
private void blablabla()
{
// I need here update MyField1 of current MyObjSource object
// txtMyField1 text value must be updated
}
PS MyObjSourceに格納されているオブジェクトが1つだけの場合、使用できますか?
MyObjSource.DataSource = new MyObjClass()