Binding complex Business Objects

  • Thread starter Stefan Siebenberg
  • Start date
S

Stefan Siebenberg

I have a complex business object price (with poduct as property)

price.price_id
price.price_validfrom
price.price_validuntil
price.product.product_id
price.product.product_name
price.product.category.category_id
price.product.category.category_name

I want to bind this object to my gridview
gridview.datasource = myprice
gridview.databind

Now in my gridview-template I have the problem accessing the child
properties.
I can put <%# Container.DataItem.Price_ID %>,
but <%# Container.DataItem.product.product_name%> gives me an error.

What is the prober way to quickly solve this problem

Using: VB.NET with Framework 2.0


Stefan Siebenberg
 
G

Guest

Steve
I feel like this is way off but I use this syntax to get to sub items.
<%# Eval("(""description"")") %>
It only goes in one level. What your doing looks very complex. Maybe
you'll have some luck with it. <%#
Container.DataItem.price("(""product.product_name"")")%> or
<%# Eval("(""product.product_name"")")%>

Good Luck
DWS
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top