views:

147

answers:

1

Hello, I'm trying to use formview in order to do insert of a new entity object (called Customer) Customer has a reference to another entity called Address. How can I fill both of them in the same formview?

Thanks.

+1  A: 

After looking more into it, it seems like the problem is in the ConvertProperties method of EntityDataSourceView. Using reflector I've found out that the problem was in the line:

PropertyDescriptor pd = propertyDescriptors.Find(str, false);

(this codeline takes the inserted property name, and convert it to a descriptor)

when str = "Address.Address1" the function returns null.

I've took a look at propertyDescriptors.properties and it seems like Address.Address1 doesn't exist. Only Address.ID and Address exist.

I took a look at the population of propertyDescriptors and it seems like there is no way to change that. Or in other words, it seems like there is no solution to the problem.

bummer.

dig
+1, thanks for sharing, please mark as answer.
Shimmy