Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Typed Objects (nested) with DataGridTableStyles

Status
Not open for further replies.

AHint

Programmer
Sep 12, 2003
20
GB
I have a typed object which includes a second nested typed object. I want to show properties of the nested object on a data grid on a windows form.

Any suggestions?

So far, I have set up:

DataGridTableStyle tsl = new DataGridTableStyle();
tsl.MappingName = "ObjectA";

DataGridColumnStyle col1 = new DataGridTextBoxColumn();
col1.MappingName = "Prop1";

dataGrid1.TableStyles.Add(tsl);

Works fine for instances of objectA.Prop1.

ObjectB has a get property on objectA and I can get a column showing the whole object but wish to pick up individual properties from objectB.

Thanks in advance for your help!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top