Otis wrote:
glennpd wrote:
Otis wrote:
You could use a prefetch path to fetch the related entities and in the HTML you could do something like:
<%# ((InvRecordEntity)Eval("InvRecord").Description%>
Yes I could but I am trying to use an llblgenprodatasource loaded with an EtitiyColection. I am trying to avoid adding fields on relations for my "standard" saledetails, but make some kind of a subclass which has the additional field. I would then reference this class as the datasource for the llblgenprodatasource.
my example is using a related entity, namely the entity returned by the InvRecord property
So you just fetch: SaleDetail entities and their related InvRecordEntity entities and at runtime the databinding in the saledetail gridview using the snippet above, will show the description. Of course you have to add a column to the grid which is templated and not bound to a field in the SaleDetail entity. That's teh description column for InvRecord.
I hope I make sense.
When I try to create the prefetch path with :
Dim prefetchPath As IPrefetchPath = New PrefetchPath(CInt(EntityType.SaleDetailEntity))
the VS2005 ide says ""EntityType" Type not declared
I don't understand ???