I want an XsltListViewWebPart filtered based on some custom metadata derived from the current user. Following Claudio Brotto’s article http://blog.claudiobrotto.com/2012/extending-base-xslt-web-parts-with-custom-control-bindings , I created a web control that returns a caml query fragment containing my dynamic filters. I added then a parameter binding which modifies the original caml query adding this fragment to it.

The filtering seems to work but I had now two problems: - The heading column filters don’t work anymore - The element group counter is correct but when I expand the element group list the items inside are not filtered

The query fragment result from binding is:

<In><FieldRef Name='Title'/><Values>
  <Value Type='Text'>MP016</Value>
  <Value Type='Text'>MP150</Value>

enter image description here

        <WebPartPages:XsltListViewWebPart runat="server" .......>
        <ParameterBinding Name="CAMLQueryValuesCodiciPdv" Location="Control(CamlQueryPdvFilter1,Caml)" DefaultValue="&lt;IsNotNull&gt; &lt;FieldRef Name='ID' /&gt; &lt;/IsNotNull&gt;"/>
                <GroupBy Collapse="TRUE" GroupLimit="30">
                    <FieldRef Name="pippo"/>
                                <FieldRef Name="pippo"/>
                                <Value Type="Text">bolla</Value>
                                <FieldRef Name="pippo"/>
                                <Value Type="Text">fattura</Value>
                <FieldRef Name="pippo"/>
                <FieldRef Name="LinkTitle"/>
                <FieldRef Name="plluto"/>
            <RowLimit Paged="TRUE">30</RowLimit>
            <Aggregations Value="Off"/>
            <Toolbar Type="Freeform"/>

<GS:CamlQueryPdvFilter runat="server" id="CamlQueryPdvFilter1" ColumnFilterInternalName="Title"></GS:CamlQueryPdvFilter>

How can I resolve this?

1 Answer 1


The parameters binding work if the XsltListViewWebPart's AsyncUpdate property is true.


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.