1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Pagination ignores filter expressions.

Pagination ignores filter expressions.

3 posts, 0 answered
  1. Erik
    Erik avatar
    62 posts
    Registered:
    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).
  2. Erik
    Erik avatar
    62 posts
    Registered:
    02 May 2011
    24 May 2012
    Link to this post
    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.
  3. Erik
    Erik avatar
    62 posts
    Registered:
    02 May 2011
    24 May 2012
    Link to this post
    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?
3 posts, 0 answered