G
Guest
I noticed that the SelectCountMethod is called on every postback to the
server when navigating the pages in a GridView. Do you know why this is?
This is a performance problem since I have to do a query and then have to do
some manipulation on the entire results to figure out the count (No it isn't
possile to do it from SQL). I'm thinking I have to stash the count in my
ObjectDataSource so that I can just hand it back on a post back since it
never changes from page to page (page in the sense of paging in the
gridview). The thing is I now have to let the class bound to the
objectDatasource control know when it is a postback so I can return a cached
value instead of a recalculating it.
Is there a better way of doing this instead of linking my data object layer
to what is happening in the UI?
Thanks,
Chris
server when navigating the pages in a GridView. Do you know why this is?
This is a performance problem since I have to do a query and then have to do
some manipulation on the entire results to figure out the count (No it isn't
possile to do it from SQL). I'm thinking I have to stash the count in my
ObjectDataSource so that I can just hand it back on a post back since it
never changes from page to page (page in the sense of paging in the
gridview). The thing is I now have to let the class bound to the
objectDatasource control know when it is a postback so I can return a cached
value instead of a recalculating it.
Is there a better way of doing this instead of linking my data object layer
to what is happening in the UI?
Thanks,
Chris