databingind entitycollection to infragistics wingrid using only top level

Posts   
 
    
virginia
User
Posts: 24
Joined: 29-Nov-2016
# Posted on: 25-Mar-2021 13:27:19   

Hello.

I'm using LLBL 5.3 (5.3.0) RTM and .net 4.5.2, connecting to sql server 2005 and ora11g databases, db first, adapter model. I want to use the entitycollection (let's say it's full of fetched Command entities) as a datasource for a grid (infragistics wingrid) which can show hierarchical data, but I only want to first band (Commands), not all the related entities (Command->Order->Detail etc). It can be done at design time (not possible in my case), or I can hide the bands I don't want after the datasource is set at runtime. The problem with this second option is that the bindingmanager fetches all the related entities, which takes a lot of time. Is there any way of stoping this walk across related entities? Thanks.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 26-Mar-2021 07:14:48   

Hi Virginia,

Somewhere in your code you set the datasource at runtime, Right? That datasource is the EntityCollection you fetched using an adapter, Right? So when you fetched it you include a PrefetchPath, Right? In that prefetch path object you indicate how deep you want to fetch the related entities. If you use adapter this is the normal way to go.

Are you doing something different? If so please give us more information about the routine which fetches the entities.

Also, I'm very confident that the setup you can do on infragistics control at design time, you could also do it in runtime. It's a matter of finding the way in their documentation.

David Elizondo | LLBLGen Support Team
virginia
User
Posts: 24
Joined: 29-Nov-2016
# Posted on: 26-Mar-2021 11:17:21   

Right. Thanks. I'll dig in, I just didn't know where to start digging simple_smile