Binding object with object properties
From: kh (roadster_at_nospam.nospam)
Date: 12/02/04
- Previous message: Cor Ligthert: "Re: DateTimePicker problem with .AddNew"
- Next in thread: Jeffrey Tan[MSFT]: "RE: Binding object with object properties"
- Reply: Jeffrey Tan[MSFT]: "RE: Binding object with object properties"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 2 Dec 2004 08:01:04 -0800
Hi. I've been reading up about preparing objects for binding to Windows Forms
controls. However, I have not seen anything about how to get a control to
show an object with it's non value-type properties expanded.
For example consider the following. I want to bind a collection of
OuterObjects to a DataGrid, but the properties of the InnerObject property
are not expanded. All I get is the class name displayed as a column, wheras I
want to see InnerObject's "Name" property as a column. How do I do this
without creating a wrapper?
public class OuterObject
{
...
public InnerObject InnerObject
{
get{return innerObject;}
}
}
public class InnerObject
{
...
public string Name
{
get{return name;}
set{name = value;}
}
...
}
Thanks
kh
- Previous message: Cor Ligthert: "Re: DateTimePicker problem with .AddNew"
- Next in thread: Jeffrey Tan[MSFT]: "RE: Binding object with object properties"
- Reply: Jeffrey Tan[MSFT]: "RE: Binding object with object properties"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|