i m trying to bound a list of object to DataGrid but i m getting wrong value: the object class:
public class Attribute
{
public Attribute()
{
}
private string _name;
public string name
{
get { return _name; }
set { _name = value; }
}
private List<Value> _valueList = new List<Value>();
public List<Value> ValueList
{
get { return _valueList; }
set { _valueList = value; }
}
}
public class Value
{
private string _value;
public string value
{
get { return _value; }
set { _value = value; }
}
public override string ToString()
{
return _value.ToString();
}
}
物体清单:List<Attribute> 属性/代码>
attributeDataGrid.ItemsSource = attributes;
when i bound i get a grid with name column correct but the "ValueList" shown as "(Collection)" instead of the string...
如何约束名单?