Set MappingName to a subproperty


T

Tonello Stefano

Hi all,
I associate a datagrid control to a class (ProductPropertySet), derived
from ArrayList, that contains items from a second class, called
ProductProperty. ProductProperty contains various members of type String,
Int, and other classes (such as another my class ProductModelProperty).
I have a problem mapping members of ProductModelProperty. Let's me explain
better with some code. I use this to set tables styles:

DataGridTableStyle dgs = new DataGridTableStyle();
dgs.MappingName = "ProductPropertySet";
DataGridColumnStyle res;
res = new DataGridTextBoxColumn();

// this code doesn't work!
// Property is a member of ProductProperty with type ProductModelProperty
and Code is a member of ProductModelProperty
res.MappingName = "Property.Code";
dgs.GridColumnStyles.Add(res);

res = new DataGridTextBoxColumn();
// this code works!
res.MappingName = "Value";
dgs.GridColumnStyles.Add(res);

How should I access to member Code of my class ProductModelProperty?

Thanks you in advance

Bye
Stefano
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top