Hello!
Let's say I have this class :
class Person
{
public Address address;
public DateTime age;
...
Ctor's and so on ...
}
class Address
{
string street;
int number;
...
}
And suppose that I have a datagrid, inside a wpf grid where I set the datacontext to a list of Persons like this :
personGrid.datacontext = personDao.getAll() as List<Person>;
What I want to know is how i define what will appear in Address column. I know i can do this overriding the toString() method on Address class, but I want to do something like "DisplayMemberPath = "street" . Is that possible ?
Thanks,
Ivan Frias
Let's say I have this class :
class Person
{
public Address address;
public DateTime age;
...
Ctor's and so on ...
}
class Address
{
string street;
int number;
...
}
And suppose that I have a datagrid, inside a wpf grid where I set the datacontext to a list of Persons like this :
personGrid.datacontext = personDao.getAll() as List<Person>;
What I want to know is how i define what will appear in Address column. I know i can do this overriding the toString() method on Address class, but I want to do something like "DisplayMemberPath = "street" . Is that possible ?
Thanks,
Ivan Frias