Share via


PagedRowset Element (List)

Applies to: SharePoint Foundation 2010

Renders Collaborative Application Markup Language (CAML) within a view, executing if more items are returned in the view than the specified row limit for the view.

Most standard Microsoft SharePoint Foundation 2010 list views ignore this element. For more information, see XMLDefinition and CAML View Schema.

<PagedRowset>
</PagedRowset>

Attributes

Attribute

Description

None

N/A

Child Elements

Numerous

Parent Elements

View, ViewStyle

Occurrences

Minimum: 0

Maximum: 1

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 be displayed can be determined.

Example

The following example uses the PagedRowset element to display the string "(Items 1 to N)" where N represents the current setting for the RowLimit element. The example also displays "Next" and an icon representing "Next," which are both hyperlinks 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[ &nbsp; ]]></HTML>
   <GetVar Name="PageFirstRow" HTMLEncode="TRUE" />
   <HTML><![CDATA[ &nbsp; ]]></HTML>
   <HTML>to</HTML>
   <HTML><![CDATA[ &nbsp; ]]></HTML>
   <GetVar Name="PageLastRow" HTMLEncode="TRUE" />
   <HTML>)</HTML>
   <HTML><![CDATA[ &nbsp;<A HREF="javascript:" 
      OnClick='javascript:SubmitFormPost(" ]]></HTML>
   <ScriptQuote NotAddingQuote="TRUE">
      <PageUrl />
      <HTML>?</HTML>
      <GetVar Name="NextPageData" />
   </ScriptQuote>
   <HTML><![CDATA[ ");javascript:return false;'> ]]></HTML>
   <HTML>Next</HTML>
   <HTML><![CDATA[ </A> <A HREF="javascript:" 
      OnClick='javascript:SubmitFormPost(" ]]></HTML>
   <ScriptQuote NotAddingQuote="TRUE">
      <PageUrl />
      <HTML>?</HTML>
      <GetVar Name="NextPageData" />
   </ScriptQuote>
   <HTML><![CDATA[ ");javascript:return false;'> ]]></HTML>
   <HTML><![CDATA[ <img src=" ]]></HTML>
   <ImagesPath />
   <HTML><![CDATA[ /next.gif" border=0></A>&nbsp;
      </TD></TR></TABLE> ]]></HTML>
</PagedRowset>

See Also

Concepts

XMLDefinition and CAML View Schema

Other Resources

List Views