self service and lazyloading

Posts   
 
    
das330
User
Posts: 4
Joined: 08-Mar-2005
# Posted on: 08-Mar-2005 16:05:43   

I'm struggling with loading a grid with all of the customers in my database. I don't want to load any of the related entities.

I believe that I need to turn off lazy-loading but cant seem to find a mechanism.

I'm using self -servicing structure

code looks like:

Nlm.BaseBO.CollectionClasses.CustomerCollection customers = new Nlm.BaseBO.CollectionClasses.CustomerCollection();

customers.GetMulti(null);

ultraGrid1.DataSource = customers;

Can someone suggest how to do this?

thanks

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 08-Mar-2005 23:26:55   

You have to disable hierarchies in the grid. If you use the normal .NET grid, you can do this by setting a grid's property (AllowHierarchies if I'm not mistaken) to false, and you won't have [+] buttons in front of rows, and the user isn't able to click open a related collection, so no data is loaded through lazy loading.

Frans Bouma | Lead developer LLBLGen Pro
Zonkle
User
Posts: 18
Joined: 06-Mar-2005
# Posted on: 09-Mar-2005 10:18:01