Gridview Paging via ObjectDataSource: Why is maximumRows being set to -1?
Posted
by Bryan
on Stack Overflow
See other posts from Stack Overflow
or by Bryan
Published on 2010-05-23T23:22:29Z
Indexed on
2010/05/24
3:30 UTC
Read the original article
Hit count: 275
So before I tried custom gridview paging via ObjectDataSource... I think I read every tutorial known to man just to be sure I got it. It didn't look like rocket science.
I've set the AllowPaging = True on my gridview.
I've specified PageSize="10" on my gridview.
I've set EnablePaging="True" on the ObjectDataSource.
I've added the 2 paging parms (maximumRows & startRowIndex) to my business object's select method.
I've created an analogous "count" method with the same signature as the select method.
The only problem I seem to have is during execution... the ObjectDataSource is supplying my business object with a maximumRows value of -1 and I can't for the life of me figure out why. I've searched to the end of the web for anyone else having this problem and apparently I'm the only one. The StartRowIndex parameter seems to be working just fine.
Any ideas?
© Stack Overflow or respective owner