Site statistics
Members : 19Content : 104
Content View Hits : 18418
Who's Online
We have 308 guests online| Using a DataPager with the GridView Control Implementing IPageableItemContainer |
|
|
|
| Articles - .net framework 3.5 |
| Written by dotmod |
| Wednesday, 08 July 2009 02:34 |
|
One of the new controls that shipped with ASP.NET 3.5 is the DataPager. The big advantage with the DataPager is that it is decoupled from the data-bound control it provides paging support for. It can be placed anywhere within the data-bound control's control hierarchy (like contained within the LayoutTemplate of the ListView). It can also be placed on its own outside of the data-bound control as well. Gridview doesnot supports directly with DataPager. To enable support for gridview you must extend the gridview and implment the IPageableItemContainer Interface. Implementing IPageableItemContainer is simple. 1. Create a class inheriting from the gridview implementing IPageableItemContainer interface class. 2. Implemet the methods as given below. Following example shows the example of repeater. You can extend gridview like as repeater shown in the following code snippet. ![]() |
| Last Updated on Wednesday, 08 July 2009 02:41 |



