views:

21

answers:

0

Hi, I am trying to make a 2-way binding of a class property.

public class MyClass{
public MyField AField1{get;set;};
public MyField AField2{get;set;};
}

public class MyField{
public string Value {get; set}
}

MyClass _class = MyClass();
_dv.DataSource = _class;

Databinding text object displays MyField class name instead of Value Property. I also tried to enter:

DataMember = "AField1.Value";

Is there any way to bind (2-way) AField1.Value of a class MyClass to a visual control? Rgds, Frenk