How to Get the count of all items within collection??

Posts   
 
    
Tamer
User
Posts: 19
Joined: 04-Sep-2011
# Posted on: 25-Dec-2011 18:41:36   

Dear all ; i'm creating desk top application using vs2008 and LLBL i want to apply paging to data grid view control .. so assuming that i want to preview only 25 items per each page .. i think it will help my application to load faster so i used this code:

instocksCollection1.GetMulti(instockFilter,0,null,null,path, PageNumber, PageSize);

now how can i get the total items on my table .. not the current viewed items on data grid view control ?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 25-Dec-2011 22:18:33   

You can use the instocksCollection1.GetScalar(...) and instocksCollection1.GetDBCount(...). You can pass your filter so you get the total rows with that specific filter.

Note: if you are doing this for databinding you also can use LLBLGenProDataSource

David Elizondo | LLBLGen Support Team