GroupBy with LLBLGen data source.

Posts   
 
    
Ian avatar
Ian
User
Posts: 511
Joined: 01-Apr-2005
# Posted on: 03-Apr-2013 20:01:15   

When using the LLBLGen data source and adding a 'GroupBy' collection, how do I specify aggregate functions to apply to fields?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 04-Apr-2013 08:02:48   

You apply the expression to the fields itself, and that depends what is what you are using, normally it would be a DynamicList or TypedList. But if you are using LLBLGenProDataSource that means you want it for databinding, so the LLBLGenProDataSource and the Grid know the structure in advance, and that maybe won't work because your final projection will be different when you do the PerformSelect. So in this case I would go for doing a DynamicList and bind it directly to the grid in the code behind.

(Edit) If you are using a TypedList you could specify the Aggregate function in LLBLGen Designer, then just add the Grouper at your PerformSelect.

David Elizondo | LLBLGen Support Team