Nested ListViews with DataPager and custom data source

Posted by Mikael Östberg | Filed under ,

A while back a client ran in to some performance issues using a ASP.NET ListView control along with nested ListViews to enable some grouping capabilities. It worked fine for about 50 rows and a small amount of groups, but one of their customers had over 1000 rows grouped into 15 groups. The page could really use some paging. Without paging, the page took quite a while to render.

I made a sample for them on how to use nested ListView controls with paging on both the outer and the inner ListView controls using the DataPager control. In the sample I also included LinkButtons in both the outer and the inner ListViews to show how to handle command events from within the ListViews.

Live demo of the Nested ListView with DataPager and Custom DataSource sample.

Download the source code