Custom data paging class.
One of the most common tasks when you have to display huge amount of data from database source
is to provide front-end paging mechanism. This task became much easier when we got a DataGrid
control which provides this paging, but, nevertheless, it is not flexible enough.
Imagine, for example,that you want locate your page navigation bar in any place of the page, or you want to implement
paging mechanism on the SQL stored procedure layer, or smth else. Then DataGrid paging feature does not suit.
So, for this purpose, I have special common C# class which implements navigation bar. It should be initialized with
some parameters (PagesOnPage,PageSize, etc - refer to code), and then it builds special XML, which describes
navigation bar. After transforming it with special XSLT you get very flexible navigation bar which can hide
custom paging mechanism.
Also you can see an excerpt with comments from my real project which shows how to use this class.
In my example paging is implemented on the stored procedure layer, so you have to pass record range
in the stored procedure.
Download code
|
|