P
Paul
Hi, here's an odd one that blows my mind. I have a DataGrid with paging
enabled. I have PageSize=10. I have 25 total items, so that gives me
two pages=10 and the last page=5. Fine. When I access this last page
of 5 items in _ItemCommand(), I need an Item.Count, and I get 5 items.
Very good, I'm happy, life works.
Now I try to get the same Item.Count of 5 on the same page when I access
that page in _PageIndexChanged(). Not so good. This time it gives me
Item.Count=10. I get a range error. I'm clueless and not a happy
camper about this.
I know, I know, there is a good explanation for this aberrant behavior,
but what the hell is it?
In the _pageIndexChanged() code behind I am setting the CurrentPageIndex
= e.NewPageIndex and that appears to be correct (2). To my way of
thinking, once I do this then Items.Count should reflect reality (5),
but it doesn't.
This is truly strange. Any idea?
~Paul
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
enabled. I have PageSize=10. I have 25 total items, so that gives me
two pages=10 and the last page=5. Fine. When I access this last page
of 5 items in _ItemCommand(), I need an Item.Count, and I get 5 items.
Very good, I'm happy, life works.
Now I try to get the same Item.Count of 5 on the same page when I access
that page in _PageIndexChanged(). Not so good. This time it gives me
Item.Count=10. I get a range error. I'm clueless and not a happy
camper about this.
I know, I know, there is a good explanation for this aberrant behavior,
but what the hell is it?
In the _pageIndexChanged() code behind I am setting the CurrentPageIndex
= e.NewPageIndex and that appears to be correct (2). To my way of
thinking, once I do this then Items.Count should reflect reality (5),
but it doesn't.
This is truly strange. Any idea?
~Paul
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!