Pagination ignores filter expressions.

Posted by Community Admin on 04-Aug-2018 21:41

Pagination ignores filter expressions.

All Replies

Posted by Community Admin on 23-May-2012 00:00

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).

Posted by Community Admin on 24-May-2012 00:00

The issue seems to not be with the pager but that the filter is applied after the "skip" and "take" happen.... Still an issue though.

Posted by Community Admin on 24-May-2012 00:00

Ok.... so aparently I am applying filter expressions on the RadListView which is obviously after the DataSource is set. I need to find whatever sets the data source and give it my filters.... How do I do that?

This thread is closed