aspnet-devexpress-dot-web-dot-gridviewtemplates-05b3bfa9.md
Specifies a template to display the pager.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue(null)]
public virtual ITemplate PagerBar { get; set; }
<DefaultValue(Nothing)>
Public Overridable Property PagerBar As ITemplate
| Type | Default | Description |
|---|---|---|
| ITemplate | null |
An object that implements the ITemplate interface.
|
When you specify the PagerBar property, the grid control creates a template within a container object of the GridViewPagerBarTemplateContainer type.
Refer to the Create Templates topic for information on how to create templates for the Grid View control’s elements.
In the example below, the pager bar template contains the Prev and Next buttons to navigate the control pages.
<dx:ASPxGridView ID="grid" runat="server" AutoGenerateColumns="false">
<Templates>
<PagerBar>
<table style="width: 50%">
<tr>
<td style="padding-left: 8px;">
<dx:ASPxButton runat="server" ID="PrevButton" Text="Prev"
Enabled="<%# Container.Grid.PageIndex > 0 %>"
AutoPostBack="false" UseSubmitBehavior="false">
<ClientSideEvents Click="function() { grid.PrevPage() }" />
</dx:ASPxButton>
</td>
<td>
<dx:ASPxButton runat="server" ID="NextButton" Text="Next"
Enabled="<%# Container.Grid.PageIndex < Container.Grid.PageCount - 1 %>"
AutoPostBack="false" UseSubmitBehavior="false">
<ClientSideEvents Click="function() { grid.NextPage() }" />
</dx:ASPxButton>
</td>
</tr>
</PagerBar>
</Templates>
</dx:ASPxGridView>
View Example: How to create a custom pager and display a page size item
See Also