среда, 6 апреля 2011 г.

GridView.PagerTemplate Property


Specifies the template to use for the pager row in a GridView control.

Syntax



   <pagertemplate>
      ... template definition here
   

Property Value

An ITemplate interface that defines how the pager row of a GridView control is rendered.
The property is read/write with no default value.

Remarks

The PagerTemplate describes the layout of elements to render in the pager section of a GridView control.
When the paging feature is enabled ( AllowPaging is set to true ), a pager row is displayed in the GridView that contains the controls to enable users to navigate to the different pages in the control. The PagerTemplate enables customizing this paging interface.
 NOTE: When the PagerTemplate property is set, it overrides the built-in pager row interface.
To specify a template for the pager section of a GridView, declare a  element between the opening and closing tags of the control. You can then list the contents of the template between the opening and closing  ...  tags.
In addition, the appearance for this template can be set using the PagerStyle property.
Typically, button controls are added to the pager template to perform the paging operations. The GridView control performs a paging operation when a button control with its CommandName property set to Page is clicked. The button's CommandArgument property determines the type of paging operation to perform. The following table lists the command argument values supported by the GridView control.
CommandArgumentDescription
NextNavigates to the next page.
PrevNavigates to the previous page.
FirstNavigates to the first page.
LastNavigates to the last page.
Integer valueNavigates to the specified page number.
 NOTE: The PagerTemplate item cannot be data bound.

Комментариев нет: