PagedRowset Element

The PagedRowset element is used to render CAML within the View element. It is executed if more items are returned in the view than the given row limit for the view.

Syntax

<PagedRowset>
</PagedRowset>
Parent Elements Child Elements
View GetVar, HTML, ImagesPath, PageUrl

Remarks

This element provides a section of the view that is rendered if there is more than one page of data. Within a PagedRowset element the following variables can be implemented:

  • <GetVar Name="PageFirstRow"/> returns the item number of the first item on the current page.
  • <GetVar Name="PageLastRow"/> returns the item number of the last item on the current page.
  • <GetVar Name="NextPageData"/> returns the information that must be passed along in the URL so that the next page of data to display can be determined.

When rendering a particular page, the link to the next page may be generated by using a CAML markup, such as in the following sample:

<a href="<ows:PageUrl/>?<ows:GetVar Name="NextPageData"/>">This is a link</a>

Example

In this example, the PagedRowset element displays the string "(Items 1 to 100 Next 100)". The string "next 100" is a hyperlink to the current view page with information necessary to display the next 100 items.

<PagedRowset>
  <HTML><![CDATA[<TABLE width="100%" border=0><TR><TD align=right Class="ms-vb">]]></HTML>
  <HTML>(Items</HTML>
  <HTML><![CDATA[ ]]></HTML>
  <GetVar Name="PageFirstRow" HTMLEncode="TRUE"/>
  <HTML><![CDATA[ ]]></HTML>
  <HTML>to</HTML>
  <HTML><![CDATA[ ]]></HTML>
  <GetVar Name="PageLastRow" HTMLEncode="TRUE"/>
  <HTML>)</HTML>
  <HTML><![CDATA[ <A HREF="]]></HTML>
  <PageUrl/>
  <HTML>?</HTML>
  <GetVar Name="NextPageData"/>
  <HTML><![CDATA[">]]></HTML>
  <HTML>Next</HTML>
  <HTML><![CDATA[</A><A HREF="]]></HTML>
  <PageUrl/>
  <HTML>?</HTML>
  <GetVar Name="NextPageData"/>
  <HTML><![CDATA[">]]></HTML>
  <HTML><![CDATA[<img src="]]></HTML>
  <ImagesPath/>
  <HTML><![CDATA[/next.gif" border=0></A></TD></TR></TABLE>]]></HTML>
</PagedRowset>