RadListView supports custom paging for various scenarios where you either want to handle paging yourself, or delegate it to a data source control.
The first example demonstrates RadListView with manually handled custom paging. A RadSlider control is used to navigate amoung the set of all customers, with enabled AutoPostback that fires the control's ValueChanged event on the server. There, we call the RadLisViewItem.FireCommand() method. The method itself invokes RadListView's PageIndexChanged event where we need to set up the next page of data to be extracted.
To enable custom paging in RadListView, you need to set:
AllowPaging = true; - enable paging for RadListView
AllowCustomPaging = true; - enable custom paging for RadListView
VirtualItemCount = [number]; - set the virtual total item count in the data source
When custom paging is enabled in RadListView, the control only fires its PageIndexChanged event on the server and rebinds after that. The developer is responsible for implementing the paging logic and providing the requested page of data to RadListView inside the event handler.
Finally, we use a RadToolTip to display the leftmost contact name that will be loaded when sliding the handler. The tooltip text is taken from an array that is populated with the contact names fetched on the server using the RegisterArrayDeclaration() method of the ClientScriptManager object.
The second RadListView demonstrates binding to a custom objects collection using an ObjectDataSource control. The data source control has paging enabled and it is sufficient for the developer to enable paging in RadListView. All the paging operations are then delegated to the ObjectDataSource control.