29 Dec 2005
28 Jul 2010
Link to this post
I have a custom NewsView template in which I've implemented custom search. The search results themselves are returned and displayed correctly, since upon search I rebind the repeater DataSource to my custom IList,
Unfortunately, the pager1 control always maintains the information of the 'default' search, i.e. the search setup via the NewsView control. For example, if the 'unsearched' original NewsView shows a pager having 3 pages of 10 items per page, any subsequent custom search also shows 3 pages even if only a single item is returned. I assume this is because although I've rebound the repeater control, the pager1 remains bound to the original datasource of the repeater.
How can I rebind the pager1 control so that its pages, etc. agree with the rebound repeater's new DataSource?