Re: SelectCountMethod error - looking for parameters?
- From: "Manu" <manunews@xxxxxxxxx>
- Date: 7 Jun 2006 21:40:57 -0700
Miky,
of course you need to retrieve the total row count from the database to
do decent paging. However, IMHO a better design would be to have an
output parameter in your select method instead of another method to
call. That way your SelectMethod can be static and everything done in
one call to the database server. With that logic split in two method
calls you need to have an instance variable to save the total row count
and return it in the SelectCountMethod or to perform another call to
the database in the SelectCountMethod (with most custom paging schemas
you can know the total row count where you do paging).
Manuel Abadia
http://www.manuelabadia.com
miky wrote:
Manuel,
Actually, the SelectCountMethod is needed in my case since I'm handling
paging at the database, not using the GridView's default mechanism.
Since this method only returns a designated page at a time the GridView
can't know the total records unless I tell it.
I'll look into your thoughts on attributes. I don't have a grasp of
them yet.
Thanks for your help (and the reference - I'll have to look into that
too)!
miky
.
- Follow-Ups:
- References:
- SelectCountMethod error - looking for parameters?
- From: miky
- Re: SelectCountMethod error - looking for parameters?
- From: Manu
- Re: SelectCountMethod error - looking for parameters?
- From: miky
- Re: SelectCountMethod error - looking for parameters?
- From: Manu
- Re: SelectCountMethod error - looking for parameters?
- From: miky
- SelectCountMethod error - looking for parameters?
- Prev by Date: Re: Securing fields
- Next by Date: URL to Open Word with A Specific File
- Previous by thread: Re: SelectCountMethod error - looking for parameters?
- Next by thread: Re: SelectCountMethod error - looking for parameters?
- Index(es):
Relevant Pages
|