2

I would like to search the items in a Dataview webpart.

Is it possible to configure search in Dataview webpart?

1

You can create a filtered webpart that connects with the DataView WebPart that filters based on a search result type of your choosing (Text, URL Parameter, Choice, etc). That acts as a search for that webpart.

  • Add the Text Filter Web Part to the Web Part Page.
  • In the Text Filter Web Part, click the Open the tool pane link.
  • Edit the custom Web Part properties
  • Create and customize the Data View Web Part
  • Click the Web Part menu Web Part menu for the Text Filter Web Part, point to Connections, point to Send Filter Values To, and then click the name of the Data View Web Part to which you want to link.
  • Click Configure, select the column that you want to filter in the Data View Web Part from the list box, and then click Finish.
  • To exit Web Part Page Edit Mode and view the page, at the top of the Web Part Page, under the Site Actions Button image menu, click Exit Edit Mode.

https://support.office.com/en-US/Article/Connect-a-Filter-Web-Part-to-a-Data-View-Web-Part-bc10362e-afaa-42dc-b09e-ba8b1b83bb3c?ui=en-US&rs=en-US&ad=US

0

I am trying to get the same thing accomplished and the best I have been able to find while still using a data view is to use an HTML form web part. It doesn't work as an actual search, as in you have to type the exact value in for it to return a result. This doesn't work in my situation, possibly could for yours.

My alternative that I am working on now is using search and creating a display template. I can use a content search web part and have close to the same format and functionality as a data view web part. With this I can use a search box and point the results to the web part as well.

5
  • i tried this,but no results are getting displayed.Even if i enter the exact value in the HTML form,no results are returned in the DVWP
    – George
    Nov 27 '14 at 11:38
  • Make sure you send the connection to the data view from the form and filter it on the appropriate field.
    – Jordan
    Nov 27 '14 at 17:44
  • The search works fine today.. Not sure what was the issue as i didnt do any changes today..If i try to add more than one column to retrieve data from ,it doesnt display result,so it makes it impossible to search on all columns in the DVWP
    – George
    Nov 28 '14 at 11:42
  • Interesting. Yes, you will only be able to connect the filter to one field this way. For me I used a DVWP to display data and filter for results using URL filters. When it came to searching on the list, I added in a search box and a content search on the page. Then I created a custom display template, to give it a similar look to my DVWP format.
    – Jordan
    Dec 1 '14 at 16:53
  • Unfortunately, I am displaying external XML data using DVWP and your approach may not help me right?
    – George
    Dec 3 '14 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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