CMSAbstractDataFilterControl and paging in query string mode

Yehuda Lando asked on August 16, 2014 17:26

Hi,

I have a repeater with a connected filter. When I use paging in query string mode, the filter is getting cleared when I move to a different page. So until now I usually use the pager in post back mode when I have a filter, but I would like to use query string mode so I can link to different pages and from SEO perspective. Storing the filter value in view state won't work since I'm requesting a different page, I also tried to override the "StoreFilterState" method, but then I get an 'object is null'.

What is the correct why to implement this?

Thanks

Recent Answers


Martin Danko answered on December 1, 2014 14:36

Hi Yehuda,

In general you should use the same filter for the filter as for paging. So if you are willing to use the querystring paging you should use the querystring filter as well. It seems that you are trying to workaround this behavior by using StoreFilterState but this is designed for the UniGrid control.

Best regards, Martin

0 votesVote for this answer Mark as a Correct answer

Yehuda Lando answered on December 2, 2014 19:14

What do you mean about the query string filter?

0 votesVote for this answer Mark as a Correct answer

Martin Danko answered on December 6, 2014 13:37

Hi Yehuda,

sorry for not being clear enough. What I meant is that you should use the same approach, so when you are using querystrings with paging, you should also also use querystrings with filters (Developing custom filters). But in seems that it wasn't created for such a purpose that you are trying to use if for.

Best regards, Martin

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.