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

I would like to filter a DWP using parameters. So i decided to use a asp:textbox and then filter using Control like so:

<ParameterBinding Name="loc" Location="Control(locid)" DefaultValue=""/>

Which i think it was a good idea.I can see the control id in the list when i adding parameters. But when i try to use it in the filter its doesn't work. It seems the parameter is not reaching the filtering part. I actually did add the params like this also

<xsl:for-each select="/dsQueryResponse/Rows/Row[@Location = $loc]">

But no luck.I read somewhere that it cousl be forms but the asp:TextBox is not in a webpart. Where should i place the as:textboz for this to work? Also tried Forms(locid) but no luck. Seems SP Designer 2010 is more difficult than SP 2007 Designer really

share|improve this question

1 Answer 1

You can do it by using webpart connections. Dataview webpart can consume values from Providers which implement IWebPartField, IWebPartRow.

One such webpart available out-of-box is HTML Form webpart which you can connect to Dataview (Modify Webpart>Connections>Provide Form Values to). It is a textbox which you can use to filter dataview.

If you want to have your own custom provider control(Textbox), this post may help you: http://extreme-sharepoint.com/2009/08/14/exposing-sharepoint-webpart-properties-to-end-users-using-connections/

share|improve this answer
    
Thanks.But I did use another method using the Form Action. Will post it soon> –  naijacoder Apr 12 '12 at 6:05
    
define "soon" ... :) –  Ole Albers Apr 16 '13 at 13:10

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.