Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Dynamically adding a field to an entity collection
 

Pages: 1
LLBLGen Pro Runtime Framework
Dynamically adding a field to an entity collection
Page:1/1 

  Print all messages in this thread  
Poster Message
alexdresko
User



Location:
Greenville, SC
Joined on:
08-Jun-2004 17:30:02
Posted:
336 posts
# Posted on: 02-Jan-2007 23:43:47.  
LLBLGen version: 2.0.0.0 final
OS: XP SP2
Template set: Self servicing, C#
Project language: VB.NET
Favorite zoo animal: Gorilla

Let's take the following simple code block for example...

Code:

Dim animals As New AnimalCollection

animals.GetMulti(null)

someGrid.DataSource = animals


Is it possible to add a field on a related field here (before the DataSource line)? For example, let's say there is a GorillaAttributeCollection with a 1:1 relation on AnimalCollection.

My grid, which already exists, is already bound to the AnimalCollection. AnimalCollection has its own relationships and such which must remain intact for the form to work properly. However, in SOME cases, I need the grid to display additional fields from the GorillaAttribute collection.

Can this be done?

(No animals were harmed in the creation of this post)
I'm not a player, I just code a lot.   Top
bclubb
User



Location:
Norman, Oklahoma
Joined on:
12-Feb-2004 22:18:04
Posted:
934 posts
# Posted on: 03-Jan-2007 01:17:19.  
I don't think you can add a dynamically created field on related field. What you could do is prefetch this other gorillaAttribute entity and then for instance with a grid use the RowDataBound event to fill in the information from the related GorillaAttribute.

  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.