Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> How to Create Empty EntityCollection?
 

Pages: 1
LLBLGen Pro Runtime Framework
How to Create Empty EntityCollection?
Page:1/1 

  Print all messages in this thread  
Poster Message
pandu
User



Location:

Joined on:
18-May-2006 07:20:06
Posted:
86 posts
# Posted on: 21-Nov-2006 06:53:08.  
This is for a Webapp.

My Entity has:

Item
ItemColor
ItemSize
ItemPrice
ItemAmount

I need to bind a entitycollection based on this entity to a grid, but without the ItemSize Field. In other words, binding Entity Collection must be grouped by Item, ItemColor.

Is this possible? If not, can I use Dynamic List? This is for editing purpose. So, I need to convert the Dynamic List to EntityCollection before binding to the Grid.

Any suggestions?
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37804 posts
# Posted on: 21-Nov-2006 09:20:32.  
pandu wrote:
This is for a Webapp.

My Entity has:

Item
ItemColor
ItemSize
ItemPrice
ItemAmount

I need to bind a entitycollection based on this entity to a grid, but without the ItemSize Field. In other words, binding Entity Collection must be grouped by Item, ItemColor.

Is this possible? If not, can I use Dynamic List? This is for editing purpose. So, I need to convert the Dynamic List to EntityCollection before binding to the Grid.

Any suggestions?

You just want to not show a single column or you want to group data together? (in which case you can't edit it, you can't edit aggregated data, as it's aggregated). So I assume you just want to edit entities but not show that single column. That's simple: setup the grid with the webform designer and an llblgenprodatasource(2) control and then edit the columns in the grid. There you can remove a column from the grid which then won't show up Regular Smiley


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
pandu
User



Location:

Joined on:
18-May-2006 07:20:06
Posted:
86 posts
# Posted on: 21-Nov-2006 13:16:16.  
It does work Frans.

The problem is that I need to edit this Dynamic List... (Oh.. I can hear your "You cannnn't do that.. ".. Regular Smiley )

What If I need to edit the Dynamic List? How do I convert this to an EntityCollection? So that, i can bind it to a Grid to get the Batch Input. In other words, It won't save to the real table until I click a Save All Button.

Hope I didn't confuse you. Regular Smiley







  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37804 posts
# Posted on: 21-Nov-2006 14:03:49.  
pandu wrote:
It does work Frans.

The problem is that I need to edit this Dynamic List... (Oh.. I can hear your "You cannnn't do that.. ".. Regular Smiley )

What If I need to edit the Dynamic List? How do I convert this to an EntityCollection? So that, i can bind it to a Grid to get the Batch Input. In other words, It won't save to the real table until I click a Save All Button.

Hope I didn't confuse you. Regular Smiley

Grouped data (created with a group by clause) is data which is added/subtracted etc.. To edit that you need to convert the data back to 1 or more entities, which always has to be done in custom code but again: it doesn't make any sense. It's like altering an Order total and then saving the changed total back into 5 order row entities.

Editing a non-grouped set of data can be done in entities (prefered) or by fetching the entities afterwards based on the PK's in the list. Then set the values in the entities loaded and save them again.


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Pages: 1  


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

Version: 2.1.12172008 Final.