Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
That indeed is the best option, I think. Reworking my code took only thirty minutes and then it worked as expected. Thanks! –  Harm Jun 10 '11 at 9:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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