2

In SPD 2010 I created a datasource which produces XML, based on the requests you send to it. The datasource works correctly, because when I put it on a page, it shows me the results I expect. Because the datasource can return a large number of results, I turned on paging in the dataformwebpart I use to present my datasource. This also, works as expected.

Troubles started when I made it possible to dynamically update the request to the datasource through a webpart connection from a SimpleHtml webpart.

The use case that goes wrong, is as follows: - User opens page and sees a list of items (returned by the datasource). - User goes to page 2 and decides that this is not what he wants to see. - User therefore enters a search term and presses 'Search'. - On the background: when user presses 'Search' the new search term is send through a webpart connection to the datasource, which dynamically reloads the data (without completely reloading the page), so user sees new results. - However, user was on page 2 when he initiated the search and he still is on page 2 of the search results after the datasource got updated on the page.

The problem: how do I reset the paging in a dataformwebpart when the user enters a new search term?

1 Answer 1

0

I'd probably work it so that you force a page refresh with the search term as a query string parameter that the data view web part can pick up and filter by.

1
  • That indeed is the best option, I think. Reworking my code took only thirty minutes and then it worked as expected. Thanks!
    – Harm
    Commented Jun 10, 2011 at 9:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.