asp.net.ph

DetailsView.PagerTemplate Property

System.Web.UI.WebControls Namespace   DetailsView Class


.NET Framework version 2.0

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

Syntax

<asp:detailsview ... >

   <pagertemplate>
      ... template definition here
   </pagertemplate>

</asp:detailsview>

Property Value

An ITemplate interface that defines how the pager row of a DetailsView 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 DetailsView control.

When the paging feature is enabled ( AllowPaging is set to true ), a pager row is displayed in the DetailsView 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 DetailsView, declare a <PagerTemplate> element between the opening and closing tags of the control. You can then list the contents of the template between the opening and closing <PagerTemplate> ... </PagerTemplate> 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 DetailsView 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 DetailsView control.

CommandArgument Description
Next Navigates to the next page.
Prev Navigates to the previous page.
First Navigates to the first page.
Last Navigates to the last page.
Integer value Navigates to the specified page number.

NOTE: The PagerTemplate item cannot be data bound.

See Also

DetailsView Members   BottomPagerRow   PagerStyle   TopPagerRow Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph