Gridview row count troubles

S

SAL

Hello,
I have a small Web app that has a couple of pages in it. Both pages have
gridviews on them with basically the same ObjectDataSource. This object data
source is a business class. One of the GridViews allows editing so I enable
ViewState on that one. The other one does not so I disable ViewState on that
one.
The problem is that the one with the ViewState disabled is reporting correct
row numbers while the other one does not.
I can perform the same filtering on the gridview with view state disabled
over and over again and I get the same row count each time. However, I have
to perform the same filtering twice on the one with view state enabled to
get the correct row count (only the 2nd time)...
How can I make the one with view state enabled report the correct row count
each time?


SAL
 
W

Walter Wang [MSFT]

Hi SAL,

Could you please post some code? Based on my understanding so far, such
issue is probably caused by when do you change the row filter and when do
you read the row count. The order matters since some events are occurred in
different stage in a page's life cycle:

#ASP.NET Page Life Cycle Overview
http://msdn2.microsoft.com/en-us/library/ms178472.aspx



Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top