The ASP:DataList controls implements neither the IPageableItemContainer
nor the IRadPageableItemContainer
interfaces. That is why you cannot use RadDataPager to page it directly by simply setting the RadDataPager PagedControlID.
However you can implement paging in a similar manner as it is done in this demo
. The main points here are:
- you need to handle the OnTotalRowCountRequest event of the RadDataPager and there set the TotalRowCount;
- you need to handle the PageIndexchanged event of the RadDataPager. The you need to assign the new DataSource for the DataList and call its DataBind method so it is populated with the data for the new page.
Additionally, to use the RadDataPager control with no code, you can implement your data visualization though ASP:ListView or RadListView. See the below demos for more information:
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed