0

I'm using partial text filters that push query string parameters to the Data View Web Part. The DVWP is using an XSLT filter that refers to the values supplied by the textboxes. The challenge that I'm facing is temporarily disabling 10 row paging when doing a search via the filters. If I do a search and the item is not in the 10 items that are showing the user gets a blank view. However, if you click on the next page the item is there. Reason being is that it's on the 2nd page to begin with.

I've been trying to manipulate the XSLT, by setting a cookie when the user searches, then having the DVWP refer to the cookie value 'Search=bool'. So that part is working. However, I've been trying to fake out the DVWP by setting $RowLimit=0 or $LastRow=100, to no avail. I would appreciate any recommendations to disable paging if my cookie is 'true'. Or perhaps there's a property setting that I'm overlooking? I've included all relevant source for implementation details. Note that I took out the data fields declaration for a tad more brevity, but the markup is still rather verbose.

<%-- _lcid="1033" _version="14.0.4762" _dal="1" --%> <%-- _LocalBinding --%>
<%@ Page language="C#" MasterPageFile="~masterurl/default.master"    Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document" meta:webpartpageexpansion="full"  %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="WpNs1" Namespace="Microsoft.Office.InfoPath.Server.Controls.WebUI" Assembly="Microsoft.Office.InfoPath.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>
<%@ Register TagPrefix="WpNs0" Namespace="Microsoft.SharePoint.Portal.WebControls" Assembly="Microsoft.Office.Server.FilterControls, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
<SharePoint:ListItemProperty Property="BaseName" maxlength="40" runat="server"/>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea" runat="server">
<WebPartPages:SPProxyWebPartManager runat="server" id="spproxywebpartmanager">
<SPWebPartConnections><WebPartPages:SPWebPartConnection ConsumerConnectionPointID="DFWP Parameter Consumer ID" ConsumerID="dvwpProject" ID="g_3C24AF600A154EA6BE0C7F12303FE4D7" ProviderConnectionPointID="ITransformableFilterValues" ProviderID="g_3a44b974_52df_4463_8d80_a4c89f574080"><WebPartPages:TransformableFilterValuesToParametersTransformer ConsumerFieldNames="ProjectID" ProviderFieldNames="Search by Project ID"></WebPartPages:TransformableFilterValuesToParametersTransformer>
</WebPartPages:SPWebPartConnection>
<WebPartPages:SPWebPartConnection ConsumerConnectionPointID="DFWP Parameter Consumer ID" ConsumerID="dvwpProject" ID="g_99F24A6B07D84FD18DCF86DA33C32E83" ProviderConnectionPointID="ITransformableFilterValues" ProviderID="g_ecbbcf14_c106_45e7_b751_5f78a6306348"><WebPartPages:TransformableFilterValuesToParametersTransformer ConsumerFieldNames="ProjectName" ProviderFieldNames="Search by Project Name"></WebPartPages:TransformableFilterValuesToParametersTransformer>
</WebPartPages:SPWebPartConnection>
<WebPartPages:SPWebPartConnection ConsumerConnectionPointID="DFWP Parameter Consumer ID" ConsumerID="dvwpProject" ID="g_9D8702A2A15B4DC3AA5B2B8A4D71E96F" ProviderConnectionPointID="ITransformableFilterValues" ProviderID="g_66794111_e0ee_45ee_8365_ceda46377ada"><WebPartPages:TransformableFilterValuesToParametersTransformer ConsumerFieldNames="CustomerName" ProviderFieldNames="Search by Customer Name"></WebPartPages:TransformableFilterValuesToParametersTransformer>
</WebPartPages:SPWebPartConnection>
</SPWebPartConnections></WebPartPages:SPProxyWebPartManager>                                        
<h2>
<asp:ScriptManagerProxy runat="server" id="ScriptManagerProxy">
</asp:ScriptManagerProxy>
</h2>
<WebPartPages:WebPartZone runat="server" title="loc:TitleBar" id="TitleBar" AllowLayoutChange="false" AllowPersonalization="false"><ZoneTemplate>
<WebPartPages:TitleBarWebPart runat="server" AllowEdit="True" AllowConnect="True" ConnectionID="00000000-0000-0000-0000-000000000000" Title="Web Part Page Title Bar" IsIncluded="True" Dir="Default" IsVisible="True" AllowMinimize="False" ExportControlledProperties="True" ZoneID="TitleBar" ID="g_b3f30441_c530_4529_9c80_28d926aeec94" HeaderTitle="Home-New" AllowClose="False" FrameState="Normal" ExportMode="All" AllowRemove="False" AllowHide="True" SuppressWebPartChrome="False" DetailLink="" ChromeType="None" HelpLink="" MissingAssembly="Cannot import this Web Part." PartImageSmall="" HelpMode="Modeless" FrameType="None" AllowZoneChange="True" PartOrder="2" Description="" PartImageLarge="" IsIncludedFilter="" __MarkupType="vsattributemarkup" __WebPartId="{B3F30441-C530-4529-9C80-28D926AEEC94}" WebPart="true" Height="" Width=""></WebPartPages:TitleBarWebPart>    
</ZoneTemplate></WebPartPages:WebPartZone>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderTitleAreaClass" runat="server">    
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
<meta name="GENERATOR" content="Microsoft SharePoint" />
<meta name="ProgId" content="SharePoint.WebPartPage.Document" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="CollaborationServer" content="SharePoint Team Web Site" />
<script type="text/javascript">
// <![CDATA[
var navBarHelpOverrideKey = "WSSEndUser";
// ]]>
</script>
<SharePoint:UIVersionedContent ID="WebPartPageHideQLStyles" UIVersion="4" runat="server">
<ContentTemplate>
</ContentTemplate>
</SharePoint:UIVersionedContent>    
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderSearchArea" runat="server">
<SharePoint:DelegateControl runat="server"
ControlId="SmallSearchInputBox"/>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderLeftActions" runat="server">
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageDescription" runat="server">
<SharePoint:ProjectProperty Property="Description" runat="server"/>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderBodyRightMargin" runat="server">
<div height="100%" class="ms-pagemargin"><img src="/_layouts/images/blank.gif" width="10" height="1" alt="" /></div>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageImage" runat="server"></asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderNavSpacer" runat="server"></asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<h1 class="ms-rteElement-H1B" style="margin-bottom:0px;padding:10px 0 10px 65px"><span>
Sales Tracking and Reporting</span></h1>
<table cellpadding="4" cellspacing="0" border="0" width="1024px">
<tr>
<td id="_invisibleIfEmpty" name="_invisibleIfEmpty" valign="top" width="100%">
<div id="main" style="float:left;">
<div id="dvwp-container" class="container" style="left: 0px; top: 5px; width: 758px">
<WebPartPages:WebPartZone runat="Server" Id="LeftZone" Title="LeftZone" AllowLayoutChange="true"><ZoneTemplate>
<WebPartPages:DataFormWebPart runat="server" Description="" ListDisplayName="" PartOrder="2" HelpLink="" AllowRemove="True" IsVisible="True" AllowHide="True" UseSQLDataSourcePaging="True" ExportControlledProperties="True" DataSourceID="" Title="Project Search" ViewFlag="8" NoDefaultStyle="TRUE" AllowConnect="True" FrameState="Normal" PageSize="10" PartImageLarge="" AsyncRefresh="False" ExportMode="All" Dir="Default" DetailLink="" ShowWithSampleData="False" ListId="e526a51b-bcbd-44d3-866f-3cd74e9e0179" ListName="{E526A51B-BCBD-44D3-866F-3CD74E9E0179}" FrameType="None" PartImageSmall="" IsIncluded="True" SuppressWebPartChrome="False" AllowEdit="True" ManualRefresh="False" ChromeType="None" AutoRefresh="False" AutoRefreshInterval="60" AllowMinimize="True" ViewContentTypeId="" InitialAsyncDataFetch="False" MissingAssembly="Cannot import this Web Part." HelpMode="Modeless" ListUrl="" ID="dvwpProject" ConnectionID="00000000-0000-0000-0000-000000000000" AllowZoneChange="True" IsIncludedFilter="" __MarkupType="vsattributemarkup" __WebPartId="{31B02B10-F3EC-4C83-B362-CF405EAD31CB}" __AllowXSLTEditing="true" WebPart="true" Height="" Width=""><ParameterBindings>
<ParameterBinding Name="dvt_apos" Location="Postback;Connection"/>
<ParameterBinding Name="ManualRefresh" Location="WPProperty[ManualRefresh]"/>
<ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>
<ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/>
<ParameterBinding Name="dvt_startposition" Location="Postback" DefaultValue=""/>
<ParameterBinding Name="dvt_firstrow" Location="Postback;Connection"/>
<ParameterBinding Name="dvt_nextpagedata" Location="Postback;Connection"/>
<ParameterBinding Name="ProjectID" Location="QueryString(ProjectID)" DefaultValue=""/>
<ParameterBinding Name="ProjectName" Location="QueryString(ProjectName)" DefaultValue=""/>
<ParameterBinding Name="CustomerName" Location="QueryString(CustomerName)" DefaultValue=""/>
<ParameterBinding Name="SearchResult" Location="Cookie(SearchResult)" DefaultValue="false"/>
</ParameterBindings>
<DataFields>
</DataFields>
<Xsl>


<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
<xsl:output method="html" indent="no"/>
<xsl:decimal-format NaN=""/>
<xsl:param name="dvt_apos">&apos;</xsl:param>
<xsl:param name="ManualRefresh"></xsl:param>
<xsl:param name="dvt_firstrow">1</xsl:param>
<xsl:param name="dvt_nextpagedata" />
<xsl:param name="ProjectID" />
<xsl:param name="ProjectName" />
<xsl:param name="CustomerName" />
<xsl:param name="SearchResult">false</xsl:param>

<xsl:variable name="dvt_1_automode">0</xsl:variable>

<xsl:template match="/" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls">
<xsl:choose>
<xsl:when test="($ManualRefresh = 'True')">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<xsl:call-template name="dvt_1"/>
</td>
<td width="1%" class="ms-vb" valign="top">
<img src="/_layouts/images/staticrefresh.gif" id="ManualRefresh" border="0" onclick="javascript: {ddwrt:GenFireServerEvent('__cancel')}" alt="Click here to refresh the dataview."/>
</td>
</tr>
</table>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="dvt_1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template name="dvt_1">
<xsl:variable name="dvt_StyleName">Table</xsl:variable>
<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[((contains(@ID, $ProjectID) and string-length($ProjectID)&gt;0) or string-length($ProjectID)=0) and
((contains(translate(@_x007b_039ad0f3_x002d_f254_x002d_4faa_x002d_94fe_x002d_812264330f8b_x007d_,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),
translate($ProjectName,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')
) and string-length($ProjectName) &gt; 0) or string-length($ProjectName)=0) and
((contains(translate(@_x007b_a86cc714_x002d_c600_x002d_469c_x002d_b30c_x002d_d30355e5febb_x007d_,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),
translate($CustomerName,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')
) and string-length($CustomerName) &gt; 0) or string-length($CustomerName)=0)]"/>   

<!--<xsl:variable name="dvt_RowCount" select="count($Rows)"/>-->
<xsl:variable name="FirstRow" select="$dvt_firstrow" />
<xsl:variable name="RowLimit">
<xsl:choose>
<xsl:when test="$SearchResult='true'">
<xsl:value-of select="0" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="10" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>

<xsl:variable name="dvt_RowCount">
<xsl:choose>
<xsl:when test="$SearchResult='true'">
<xsl:value-of select="1000" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="count($Rows)" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>    

<!--<xsl:variable name="dvt_IsEmpty">
<xsl:choose>
<xsl:when test="$SearchResult='true'">
<xsl:value-of select="false" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$dvt_RowCount = 0" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>-->                              

<xsl:variable name="IsEmpty">
<xsl:choose>
<xsl:when test="$SearchResult='true'">
<xsl:value-of select="false" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$dvt_RowCount = 0" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable> 

<!--
<xsl:variable name="LastRow">
<xsl:choose>
<xsl:when test="$SearchResult='true'">
<xsl:value-of select="1000" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$FirstRow + $dvt_RowCount - 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>-->     

<xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0"/>
<!--<xsl:variable name="IsEmpty" select="$dvt_RowCount = 0" />-->
<xsl:variable name="LastRow" select="$FirstRow + $dvt_RowCount - 1" />

<!-- Output values for debugging -->
$dvt_RowCount: <xsl:value-of select="$dvt_RowCount" /><br/>                             
$dvt_IsEmpty: <xsl:value-of select="$dvt_IsEmpty" /><br/>   
$SearchResult: <xsl:value-of select="$SearchResult" /><br/>                             
$RowLimit: <xsl:value-of select="$RowLimit" /><br/>
$FirstRow: <xsl:value-of select="$FirstRow" /><br/>
$LastRow: <xsl:value-of select="$LastRow" />

<xsl:choose>
<xsl:when test="$dvt_IsEmpty">
<xsl:call-template name="dvt_1.empty"/>
</xsl:when>
<xsl:otherwise>
<table border="0" width="100%" cellpadding="2" cellspacing="0" class="table">
<tr valign="top">
<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
<th class="ms-vh" width="1%" nowrap="nowrap"></th>
</xsl:if><th nowrap="nowrap">Project ID</th><th nowrap="nowrap">Project Name</th><th nowrap="nowrap">Customer Name</th><th nowrap="nowrap">Project Stage</th></tr>
<xsl:call-template name="dvt_1.body">
<xsl:with-param name="Rows" select="$Rows"/>
<xsl:with-param name="FirstRow" select="1" />
<xsl:with-param name="SearchResult" select="$SearchResult" />
<xsl:with-param name="LastRow" select="$LastRow - $FirstRow + 1" />
</xsl:call-template>
</table>
</xsl:otherwise>
</xsl:choose>
<xsl:call-template name="dvt_1.commandfooter">
<xsl:with-param name="FirstRow" select="$FirstRow" />
<xsl:with-param name="LastRow" select="$LastRow" />
<xsl:with-param name="RowLimit" select="$RowLimit" />
<xsl:with-param name="dvt_RowCount" select="$dvt_RowCount" />
<xsl:with-param name="RealLastRow" select="number(ddwrt:NameChanged('',-100))" />
</xsl:call-template>
</xsl:template>
<xsl:template name="dvt_1.body">
<xsl:param name="Rows"/>
<xsl:param name="FirstRow" />
<xsl:param name="LastRow" />
<xsl:param name="SearchResult" />                               

<xsl:for-each select="$Rows">                                       
<xsl:choose>
<xsl:when test="$SearchResult='true'">                                      
<xsl:call-template name="dvt_1.rowview" />                                          
</xsl:when>
<xsl:otherwise>
<xsl:if test="(position() &gt;= $FirstRow and position() &lt;= $LastRow) or $dvt_KeepItemsTogether">
<xsl:call-template name="dvt_1.rowview" />
<!--<xsl:if test="not($dvt_HideGroupDetail)" ddwrt:cf_ignore="1">
<xsl:call-template name="dvt_1.rowview" />
</xsl:if>-->
</xsl:if>                                       
</xsl:otherwise>
</xsl:choose>                                   
</xsl:for-each>
</xsl:template>
<xsl:template name="dvt_1.rowview">
<tr>
<xsl:if test="position() mod 2 = 1">
<xsl:attribute name="class">ms-alternating</xsl:attribute>
</xsl:if>
<td>
<xsl:value-of select="@ID" /></td>
<td>
<a><xsl:attribute name="href"><xsl:value-of select="concat(substring-after(@serverurl.progid,'1'),'&amp;OpenIn=Browser')"></xsl:value-of></xsl:attribute>
<xsl:value-of select="@_x007b_039ad0f3_x002d_f254_x002d_4faa_x002d_94fe_x002d_812264330f8b_x007d_" /></a></td>
<td><xsl:value-of select="@_x007b_a86cc714_x002d_c600_x002d_469c_x002d_b30c_x002d_d30355e5febb_x007d_" /></td>
<td><xsl:value-of select="@_x007b_236dfcbe_x002d_3aa1_x002d_4afc_x002d_966b_x002d_8aef2298ed39_x007d_" /></td>
<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
<td class="ms-vb" width="1%" nowrap="nowrap">
<span ddwrt:amkeyfield="ID" ddwrt:amkeyvalue="ddwrt:EscapeDelims(string(@ID))" ddwrt:ammode="view"></span>
</td>
</xsl:if>
</tr>
</xsl:template>
<xsl:template name="dvt_1.empty">
<xsl:variable name="dvt_ViewEmptyText">There are no items to show in this view.</xsl:variable>
<table border="0" width="100%">
<tr>
<td class="ms-vb">
<xsl:value-of select="$dvt_ViewEmptyText"/>
</td>
</tr>
</table>
</xsl:template>
<xsl:template name="dvt_1.commandfooter">
<xsl:param name="FirstRow" />
<xsl:param name="LastRow" />
<xsl:param name="RowLimit" />
<xsl:param name="dvt_RowCount" />
<xsl:param name="RealLastRow" />
<table cellspacing="0" cellpadding="4" border="0" width="100%">
<tr>
<xsl:if test="$FirstRow &gt; 1 or $dvt_nextpagedata">
<xsl:call-template name="dvt_1.navigation">
<xsl:with-param name="FirstRow" select="$FirstRow" />
<xsl:with-param name="LastRow" select="$LastRow" />
<xsl:with-param name="RowLimit" select="$RowLimit" />
<xsl:with-param name="dvt_RowCount" select="$dvt_RowCount" />
<xsl:with-param name="RealLastRow" select="$RealLastRow" />
</xsl:call-template>
</xsl:if>
</tr>
</table>
</xsl:template>
<xsl:template name="dvt_1.navigation">
<xsl:param name="FirstRow" />
<xsl:param name="LastRow" />
<xsl:param name="RowLimit" />
<xsl:param name="dvt_RowCount" />
<xsl:param name="RealLastRow" />
<xsl:variable name="PrevRow">
<xsl:choose>
<xsl:when test="$FirstRow - $RowLimit &lt; 1">1</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$FirstRow - $RowLimit" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="LastRowValue">
<xsl:choose>
<xsl:when test="$LastRow &gt; $RealLastRow">
<xsl:value-of select="$LastRow"></xsl:value-of>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$RealLastRow"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="NextRow">
<xsl:value-of select="$LastRowValue + 1"></xsl:value-of>
</xsl:variable>
<td nowrap="nowrap" class="ms-paging" align="right">
<xsl:if test="$dvt_firstrow &gt; 1" ddwrt:cf_ignore="1">
<a>
<xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent('dvt_firstrow={1};dvt_startposition={}')" />;</xsl:attribute>
Start</a>
<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
<a>
<xsl:attribute name="href">javascript: history.back();</xsl:attribute>
<img src="/_layouts/images/prev.gif" border="0" alt="Previous" />
</a>
<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
</xsl:if>
<xsl:value-of select="$FirstRow" />
- <xsl:value-of select="$LastRowValue" />
<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime">&amp;nbsp;</xsl:text>    
<xsl:if test="$LastRowValue &lt; $dvt_RowCount or string-length($dvt_nextpagedata)!=0" ddwrt:cf_ignore="1">
<a>
<xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent(concat('dvt_firstrow={',$NextRow,'};dvt_startposition={',$dvt_nextpagedata,'}'))" />;</xsl:attribute><!--javascript: __doPostBack('ctl00$m$dvwpProject','dvt_firstrow={11};dvt_startposition={Paged=TRUE&p_ID=14}');-->
<img src="/_layouts/images/next.gif" border="0" alt="Next" />
</a>
</xsl:if>
</td>
</xsl:template>
</xsl:stylesheet></Xsl>
<DataSources>
<SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="&lt;View&gt;&lt;Query/&gt;&lt;/View&gt;" UseInternalName="True" UseServerDataFormat="True" ID="dataformwebpart1"><SelectParameters><WebPartPages:DataFormParameter ParameterKey="ListID" PropertyName="ParameterValues" DefaultValue="{E526A51B-BCBD-44D3-866F-3CD74E9E0179}" Name="ListID"></WebPartPages:DataFormParameter><asp:Parameter DefaultValue="0" Name="StartRowIndex"></asp:Parameter><asp:Parameter DefaultValue="0" Name="nextpagedata"></asp:Parameter><asp:Parameter DefaultValue="10" Name="MaximumRows"></asp:Parameter>
</SelectParameters>
</SharePoint:SPDataSource>
</DataSources>
</WebPartPages:DataFormWebPart>

</ZoneTemplate></WebPartPages:WebPartZone>
</div>
<div id="container-filter">
<div id="container-filter-slicers">
<WebPartPages:WebPartZone runat="server" Title="RightZone" ID="RightZone" FrameType="TitleBarOnly" AllowLayoutChange="true" HorizontalAlignment="left" LayoutOrientation="Vertical" BorderColor="#DBDBDB"><ZoneTemplate>
<WpNs0:SPSlicerTextWebPart runat="server" CssClass="filter" FilterMainControlWidthPixels="150" RequireSelection="False" MaximumCharacters="255" ExportMode="All" PartImageLarge="/_layouts/images/wp_Filter.gif" AllowHide="True" MissingAssembly="Cannot import this Web Part." ID="g_3a44b974_52df_4463_8d80_a4c89f574080" IsIncludedFilter="" DetailLink="" AllowRemove="True" AllowEdit="True" HelpMode="Modeless" IsIncluded="True" Description="Filters the contents of Web Parts by allowing users to enter a text value." FrameState="Normal" Dir="Default" AllowZoneChange="True" AllowMinimize="True" Title="Search by Project ID" PartOrder="2" FrameType="None" CatalogIconImageUrl="/_layouts/images/wp_Filter.gif" FilterName="Search by Project ID" HelpLink="" PartImageSmall="/_layouts/images/wp_Filter.gif" AllowConnect="True" ConnectionID="00000000-0000-0000-0000-000000000000" ExportControlledProperties="True" TitleIconImageUrl="/_layouts/images/wp_Filter.gif" ChromeType="None" SuppressWebPartChrome="False" IsVisible="True" ZoneID="RightZone" __MarkupType="vsattributemarkup" __WebPartId="{D6A87080-EED0-4146-907A-5679FBE8E370}" WebPart="true" Height="" Width="200px"></WpNs0:SPSlicerTextWebPart>

<WpNs0:SPSlicerTextWebPart runat="server" CssClass="filter" FilterMainControlWidthPixels="0" RequireSelection="False" MaximumCharacters="255" ExportMode="All" PartImageLarge="/_layouts/images/wp_Filter.gif" AllowHide="True" MissingAssembly="Cannot import this Web Part." ID="g_ecbbcf14_c106_45e7_b751_5f78a6306348" IsIncludedFilter="" DetailLink="" AllowRemove="True" AllowEdit="True" HelpMode="Modeless" IsIncluded="True" Description="Filters the contents of Web Parts by allowing users to enter a text value." FrameState="Normal" Dir="Default" AllowZoneChange="True" AllowMinimize="True" Title="Search by Project Name" PartOrder="4" FrameType="None" CatalogIconImageUrl="/_layouts/images/wp_Filter.gif" FilterName="Search by Project Name" HelpLink="" PartImageSmall="/_layouts/images/wp_Filter.gif" AllowConnect="True" ConnectionID="00000000-0000-0000-0000-000000000000" ExportControlledProperties="True" TitleIconImageUrl="/_layouts/images/wp_Filter.gif" ChromeType="None" SuppressWebPartChrome="False" IsVisible="True" ZoneID="RightZone" __MarkupType="vsattributemarkup" __WebPartId="{27F07F51-7BCE-438B-B1F8-A7148034CAA9}" WebPart="true" Height="" Width="225px"></WpNs0:SPSlicerTextWebPart>

<WpNs0:SPSlicerTextWebPart runat="server" CssClass="filter" FilterMainControlWidthPixels="0" RequireSelection="False" MaximumCharacters="255" ExportMode="All" PartImageLarge="/_layouts/images/wp_Filter.gif" AllowHide="True" MissingAssembly="Cannot import this Web Part." ID="g_66794111_e0ee_45ee_8365_ceda46377ada" IsIncludedFilter="" DetailLink="" AllowRemove="True" AllowEdit="True" HelpMode="Modeless" IsIncluded="True" Description="Filters the contents of Web Parts by allowing users to enter a text value." FrameState="Normal" Dir="Default" AllowZoneChange="True" AllowMinimize="True" Title="Search by Customer Name" PartOrder="6" FrameType="None" CatalogIconImageUrl="/_layouts/images/wp_Filter.gif" FilterName="Search by Customer Name" HelpLink="" PartImageSmall="/_layouts/images/wp_Filter.gif" AllowConnect="True" ConnectionID="00000000-0000-0000-0000-000000000000" ExportControlledProperties="True" TitleIconImageUrl="/_layouts/images/wp_Filter.gif" ChromeType="None" SuppressWebPartChrome="False" IsVisible="True" ZoneID="RightZone" __MarkupType="vsattributemarkup" __WebPartId="{164E649D-AFA0-4C17-9103-94001D8CC223}" WebPart="true" Height="" Width="225px"></WpNs0:SPSlicerTextWebPart>
</ZoneTemplate></WebPartPages:WebPartZone>
</div>
<div class="container" id="button-container"> 
<WebPartPages:WebPartZone runat="Server" Id="MiddleZone1" Title="MiddleZone1" AllowLayoutChange="true"><ZoneTemplate>
<WebPartPages:ContentEditorWebPart runat="server" __MarkupType="xmlmarkup" WebPart="true" __WebPartId="{76555BDB-3E95-439F-B519-EDA2DFD8DA8D}" >
<WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/WebPart/v2">
<Title>Content Editor</Title>
<FrameType>None</FrameType>
<Description>Allows authors to enter rich text content.</Description>
<IsIncluded>true</IsIncluded>
<PartOrder>2</PartOrder>
<FrameState>Normal</FrameState>
<Height />
<Width />
<AllowRemove>true</AllowRemove>
<AllowZoneChange>true</AllowZoneChange>
<AllowMinimize>true</AllowMinimize>
<AllowConnect>true</AllowConnect>
<AllowEdit>true</AllowEdit>
<AllowHide>true</AllowHide>
<IsVisible>true</IsVisible>
<DetailLink />
<HelpLink />
<HelpMode>Modeless</HelpMode>
<Dir>Default</Dir>
<PartImageSmall />
<MissingAssembly>Cannot import this Web Part.</MissingAssembly>
<PartImageLarge>/_layouts/images/mscontl.gif</PartImageLarge>
<IsIncludedFilter />
<ExportControlledProperties>true</ExportControlledProperties>
<ConnectionID>00000000-0000-0000-0000-000000000000</ConnectionID>
<ID>g_e9fc8b8c_5bd5_4c9d_a642_7be74b64db0c</ID>
<ContentLink xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />
<Content xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor"><![CDATA[<div id="buttonContainer" style="text-align: left"><input class="button" id="btnClearFilter" onclick="clearFilter();" type="button" value="Clear Filter"/>&nbsp;</div>]]></Content>
<PartStorage xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />
</WebPart>
</WebPartPages:ContentEditorWebPart>
</ZoneTemplate></WebPartPages:WebPartZone> 
</div>
</div>    
</div>
</td>
</tr>
<script type="text/javascript" language="javascript">if(typeof(MSOLayout_MakeInvisibleIfEmpty) == "function") {MSOLayout_MakeInvisibleIfEmpty();}</script>
</table>
</asp:Content>

And here's is the javascript snippet from master page that wires up the keypress event handler for the 'SearchResult' cookie:

<script type="text/javascript">
$().ready(function(){
$('input[name$="SPTextSlicerValueTextControl"]').keypress(function(event){
if(event.which == 13) {
setCookie('SearchResult','true',1);
}
});
});
</script>

The functions work fine. It's the temporarily disabling the paging in the XSLT template that's got me stumped.

2 Answers 2

0

What version of Sharepoint are you using? Can you share some of the technical details of your project with us?

Maybe you can set the items that are not applicable to display=none using your XSLT template and CSS?

1
  • Hi MonkeyWrench. We're using SP 2010 Enterprise. As far as technical details, I just added the xslt and javascript that are in involved in the solution to my question. The solution consist of a data view web part with 10 row paging. The dvwp is being filtered by a set of 3 text filters. I've set a cookie when a user performs a search that reads "SearchResult=true". I check for this cookie in the dvwp's xslt. I just can't figure out the last step, which is temporarily disabling paging when "SearchResult=true".
    – jive137
    Commented Jul 20, 2013 at 6:42
0

This needs to be configured in 2 places:

  1. Find pagesize="30" and specify the value you need there
  2. Find <xsl:variable name="RowLimit" select="30" /> and specify the value you need there.

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.