none
By Default Needs To Enable "Show Filter Choices" in SharePoint 2010 Library RRS feed

  • Question

  • Hi Guys,

    I need by Default  To Enable "Show Filter Choices" in SharePoint 2010 Library. Please share how can we acheive this because out of the box there is no functionality available.

     

    Thanks,

    fahad Khan

    Wednesday, July 11, 2012 5:32 AM

Answers

  • Hi fahad Khan

    You need to add data view web part on the default view page and then close your existing default web part then you can find that code,

    Refer flowing url for DVWP

    http://office.microsoft.com/en-us/sharepoint-designer-help/web-parts-for-views-and-forms-in-sharepoint-designer-2010-HA101805424.aspx#_Toc245608913


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact ravimca@live.com.

    • Marked as answer by Fahad Khann Wednesday, July 18, 2012 5:01 AM
    Wednesday, July 11, 2012 12:09 PM

All replies

  • Hi fahad Khan,

    Use SharePoint designer to open document library view page, comment or remove below both open and close tag lines

    <xsl:if test="$dvt_adhocmode = 'filter'" ddwrt:cf_ignore="1">
    ...
    </xsl:if>


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact ravimca@live.com.

    Wednesday, July 11, 2012 6:24 AM
  • Hi Ravi,

    Thanks for your help, but when I open the document library Display Form or Default View ... and find above code but unable to find in both files in SharePoint Designer.

    Can you please share If i did any thing wrong?

    Thanks,

    Fahad Khan

    Wednesday, July 11, 2012 10:55 AM
  • Hi fahad Khan

    You need to add data view web part on the default view page and then close your existing default web part then you can find that code,

    Refer flowing url for DVWP

    http://office.microsoft.com/en-us/sharepoint-designer-help/web-parts-for-views-and-forms-in-sharepoint-designer-2010-HA101805424.aspx#_Toc245608913


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact ravimca@live.com.

    • Marked as answer by Fahad Khann Wednesday, July 18, 2012 5:01 AM
    Wednesday, July 11, 2012 12:09 PM
  • First change this line <xsl:if test="$dvt_adhocmode != 'filter'" ddwrt:cf_ignore="1">
    for this line <xsl:if test="$dvt_adhocmode = 'filter'" ddwrt:cf_ignore="1">


    and change this block line 

    <xsl:choose>
             <xsl:when test="$dvt_adhocmode = 'filter'">Hide Filter Choices</xsl:when>
             <xsl:when test="$dvt_adhocmode != 'filter' and $dvt_filterfield = ''">Filter:</xsl:when>
             <xsl:otherwise>Change Filter</xsl:otherwise>
    </xsl:choose>

    for

    <xsl:choose>
             <xsl:when test="$dvt_adhocmode != 'filter'">Hide Filter Choices</xsl:when>
             <xsl:when test="$dvt_adhocmode = 'filter' and $dvt_filterfield = ''">Filter:</xsl:when>
             <xsl:otherwise>Change Filter</xsl:otherwise>
    </xsl:choose>

    this works great for me.

    • Proposed as answer by Durocher Alain Wednesday, October 10, 2012 4:21 PM
    Wednesday, October 10, 2012 4:21 PM
  • i'm unable to find

    <xsl:if test="$dvt_adhocmode = 'filter'" ddwrt:cf_ignore="1">
    ...
    </xsl:if>

    not sure what I am doing wrong... if anyone could help it would be greatly appreciated!!

    Wednesday, June 12, 2013 7:00 PM
  • Hi Lieane,

    i have the same problem with the one you described. I have a custom view with no DVWP but with an XsltListViewWebPart on it. I open the view in edit mode using SharePoint Designer but i cannot find the mentioned xsl..

    Did you manage to solve this issue?

    Monday, February 8, 2016 2:08 PM
  • Hi,

    I do have same issue displaying filter choice in SP 2013 and couldn't find below line of code in XSLTwebpart

    <xsl:if test="$dvt_adhocmode = 'filter'" ddwrt:cf_ignore="1">

    ...
    </xsl:if>

    please help

    Regards,

    Thriveni

    Monday, September 26, 2016 12:50 PM