I am working with an object which has sub objects within (see example below). I am attempting to bind a List<rootClass>
to the datagrid. When I bind the List<>
, in the cell that contains the subObject
, I see the following value ... "namespace.subObject" ...
the string values display correctly.
Ideally I would like to see the “Description” property of the subObject
in the datacell. How can I map the subObject.Description
to show in the datacell?
public class subObject
{
int id;
string description;
public string Description
{ get { return description; } }
}
public class rootClass
{
string value1;
subObject value2;
string value3;
public string Value1
{ get { return value1; } }
public subObject Value2
{ get { return value2; } }
public string Value3
{ get { return value3; } }
}