daz_oldham wrote:
There, I think I've managed to describe it in the subject.
I'm using the LLBLGenProDataSource to populate GridView with my ProductCollection.
This collection has a foreign key of CategoryID which relates to the ProductCategoryCollection. What I would like to do is display the ProductCategoryEntity.Name in one of the columns - how would I do this?
Many thanks
Darren
If using adapter, prefetch the Category entity. You cannot use a bound column, but if the CategoryID is NOT nullable, you can bind declaratively in your gridview via a template field. To bind to a label, you could do the following:
<asp:label text="<%# DataItem.ProductCategory.Name %>">
If the CategoryID IS nullable, you will have to handle in the rowdatabound event of the gridview.