Geeks With Blogs
Hani Amr


I've been playing around with paging in data form webpart. I thought ( well someone actually asked me ) about how to add a "Last Page" link to the paging in the webpart. So, I've not tested it a lot, but it may help.

Add this xsl variable inside the ms-paging td:

<xsl:variable name="PagesNumber" select="ceiling($dvt_RowCount div $RowLimit)"/>

And add this anchor tag in the place you want it to be:

          <xsl:attribute name="href">
          javascript: <xsl:value-of select="ddwrt:GenFireServerEvent(concat('dvt_firstrow={',$dvt_RowCount - $PagesNumber + 1,'};dvt_startposition={',$PagesNumber,'}'))" />;

          Last Page


Posted on Tuesday, October 11, 2011 6:16 PM Sharepoint 2010 | Back to top

Copyright © H@Ni | Powered by: | Join free