Using a DataPager with the GridView Control - Implementing IPageableItemContainer
One of the new controls that shipped with ASP.NET 3.5 is the DataPager. It's a flexible control that renders the paging elements data-bound controls that implement the IPageableItemContainer interface (currently only the ListView control). The big change with the DataPager is that it is decoupled from the data-bound control it provides paging support for. It can be embedded somewhere within the data-bound control's control hierarchy (like contained within the LayoutTemplate of the ListView), but it doesn't have to - It can exist on its own outside of the data-bound control as well. When I was writing my last post, I kind of wished the 3.5 GridView implemented the IPageableItemContainer interface. It sure would have made things simpler for me. So I thought I would take a shot at extending the GridView myself. Read on for the details. Live Demo (IE6, IE7, FF, Opera) | Download Implementing IPageableItemContainer This is a...