Getting Total Item Count in Paging Datagrid

J

jason smith

I'm not sure if I am just missing some obvious function call or what.

I want to be able to get the overall count of the records returned from
my database query. When I use datagrid.Item.Count, it only returns the
count for the current page. I see a property that lists pagecount, but
nothing for totalcount. I want to have a label above my datagrid that
says "n results returned".

Can anyone help, thanks.
 
J

jason smith

That solution will not give me the exact number. For example if the user
has paging set to 100 items per page and there are 577 items returned,
your solution will display 600 items found.

Is there a way to do (pagecount-1 * numberofpages) + (lastpagecount).


Thanks,
 
A

Alvin Bruney

get it from the underlying datagrid
datagrid.table[0].rows.count will always be accurate.
 
A

Alvin Bruney

sorry i meant dataset. duh...brain fart.

Alvin Bruney said:
get it from the underlying datagrid
datagrid.table[0].rows.count will always be accurate.

jason smith said:
That solution will not give me the exact number. For example if the user
has paging set to 100 items per page and there are 577 items returned,
your solution will display 600 items found.

Is there a way to do (pagecount-1 * numberofpages) + (lastpagecount).


Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top