02 May 2011
23 May 2012
Link to this post
I have a custom News List widget template. I am trying to add a year dropdown that will filter the list of news items. To actually filter the list I am using the FilterExpressions property on the RadListView and am adding some RadListView filter expressions. These filters work fine and the appropriate items are returned. I apply these filters in Page_Load in the codebehind of the widget template.
The problem is that when I have pagination on the page the pager ignores the fact that the items are filtered. In my case, the first page will have no results but the fourth page will.
I thought that the pager might somehow be linked to the RadListView and get its data from it before I apply the filter. That doesn't seem to be that case since there is no apparent link and ther are no items on the RadListView when I attach the filter expressions. I don't know how the pager gets its data and I would like to. Is there some way I can make the pager control respect the filter expressions? The pager is the default one dropped on the page on a NewsList widget template (Telerik.Sitefinity.Web.UI.Pager).