Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > PageCount too high for Items.Count

Reply
Thread Tools

PageCount too high for Items.Count

 
 
Keith Patrick
Guest
Posts: n/a
 
      06-09-2004
I have a datagrid control that is working fine as I update, with what I
assume are correct page counts (pre-filtered, there are probably 100 pages
of 8 items each), but on my last filtering action, I reduce the item count
to 8 items. However, the PageCount is always 3. If I click the 3rd page,
the list empties on postback. PageSize is 8, and Items.Count == 8, but
PageCount is continually 3. Can someone point me in the right direction as
to what I may be doing wrong (I can't even describe this problem with the
right keywords to get a decent Google search)?


 
Reply With Quote
 
 
 
 
Keith Patrick
Guest
Posts: n/a
 
      06-09-2004
Ahhh...found the problem: there aren't 8 items in the list. There are 16
(Items.Count is returning the count on the current page; VirtualItemCount
returns 0) + a SelectAll row, which is throwing off the count, so the 3rd
page is the overflow caused by the SelectAll rows on each page.

"Keith Patrick" <> wrote in message
news:...
> I have a datagrid control that is working fine as I update, with what I
> assume are correct page counts (pre-filtered, there are probably 100 pages
> of 8 items each), but on my last filtering action, I reduce the item count
> to 8 items. However, the PageCount is always 3. If I click the 3rd page,
> the list empties on postback. PageSize is 8, and Items.Count == 8, but
> PageCount is continually 3. Can someone point me in the right direction

as
> to what I may be doing wrong (I can't even describe this problem with the
> right keywords to get a decent Google search)?
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Paging in Datagrid-Pagecount is always 1 anon ASP .Net 0 05-10-2004 04:38 PM
Re: Problems facing in datagrid pagecount Daniel Joskovski MCSD 0 04-08-2004 10:14 PM
Re: Problems facing in datagrid pagecount Daniel Joskovski MCSD 0 04-07-2004 12:40 AM
Datagrid PageCount Nightmare!! Dave ASP .Net 4 11-13-2003 10:16 PM
retrieve PageCount of DataGrid David Potahisnsky ASP .Net 0 11-07-2003 06:32 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57