0

I have a custom DataViewWebPart to which I would like to add paging. I have included the meat of the XSLT I am using to form the scope of the details for my web part below. Any suggestions on how to implement paging on this item (since I am utilizing keys it's not so clear to me).

<xsl:key name="casebystate" match="Row" use="@StoreState"/>

   <xsl:template match="/">
      <xsl:variable name="cbs_Rows" select="/dsQueryResponse/Rows/Row/@StoreState"/>
      <table border="0" width="100%" cellpadding="2" cellspacing="0">
         <tr valign="top">
            <th class="ms-vh" nowrap="nowrap">State</th>
            <th class="ms-vh" nowrap="nowrap">Totals</th>
         </tr>
         <xsl:for-each select="//Row[generate-id() = generate-id(key('casebystate', @StoreState)[1])]">
            <xsl:sort select="@StoreState"/>
            <xsl:for-each select="key('casebystate', @StoreState)">
                <xsl:call-template name="CaseByState.rowview" />
            </xsl:for-each>
         </xsl:for-each>
      </table>         
   </xsl:template>

   <xsl:template name="CaseByState.rowview">
      <xsl:variable name="cbs_NewSortValue" select="ddwrt:NameChanged(string(@StoreState), 0)"/>
      <xsl:if test="string-length($cbs_NewSortValue) &gt; 0">
         <tr id="group0{generate-id()}">
            <td class="abh-chrtStatTitle">
               <xsl:value-of select="@StoreState"/>
            </td>
            <td class="abh-chrtStatValue">
                <xsl:value-of select="count(key('casebystate', @StoreState))"></xsl:value-of>
            </td>
         </tr>
      </xsl:if>
   </xsl:template>

Thanks for the help in advance!

TranseoSP
  • 1
  • 1
  • 6

1 Answers1

0

If you are using Sharepoint Designer 2010, are you able to select your dvwp in the designer, go to the data view tools section and click on paging from the options tab of the ribbon? That should allow you to specify paging for your webpart.

Sue White
  • 23
  • 2
  • 6