Paging in listview, using paging in stored procedures
Has anyone successfully used a ListView control instead of a GridView in theBeerHouse, and maintaining the paging used in the stored procedures?
Just hooking it up to a DataPager control would, in theory, mean that all records would be retrieved, which is not the meaning in theBeerHouse. (I say "in theory", because I haven't been able to compile and test the things I have tried so far)
My idea was to somehow set the value for PageSize and PageIndex in the ObjectDataSource, from the values in the DataPager, based on a buttons CommandValue, or from a number in the NumericPagerField.
I noticed that the ObjectDataSource has the "MaximumRowsParameterName" and "StartRowIndexParameterName" properties, which can be used when paging is enabled.
These would be set to PageSize and PageIndex, as parameters for ex. GetArticles right? Is it possible to set these parameter values based on the values from the DataPager, and keep track of them in ViewState?
Any ideas?
Thnx
|