Tab

ASPxGridViewPagerSettings.Mode Property

Gets or sets whether page-mode navigation is enabled.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

Declaration

[DefaultValue(GridViewPagerMode.ShowPager)]
public GridViewPagerMode Mode { get; set; }
<DefaultValue(GridViewPagerMode.ShowPager)>
Public Property Mode As GridViewPagerMode

Property Value

Type Default Description
GridViewPagerMode

ShowPager

A GridViewPagerMode enumeration value that specifies whether page-mode navigation is enabled.

Available values:

Name Description
ShowAllRecords

Disables page-mode navigation.

ShowPager

The ASPxGridView automatically splits content (rows) across multiple pages and provides end-users with an embedded page navigation UI - Pager. The maximum number of rows displayed on a page is specified by the ASPxGridViewPagerSettings.PageSize property.

EndlessPaging

The endless paging is enabled.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to Mode
ASP.NET Controls and MVC Extensions ASPxGridView
GridViewProperties
ASP.NET Bootstrap Controls BootstrapGridView
BootstrapGridView
ASP.NET MVC Extensions GridViewSettings
GridViewSettings<RowType>
MVCxGridView
MVCxGridViewProperties
MVCxGridViewProperties

Remarks

To enable page-mode navigation, set the Mode property to GridViewPagerMode.ShowPager. To display all rows within a grid, set this property to GridViewPagerMode.ShowAllRecords. To enable endless paging mode, set the Mode property value to GridViewPagerMode.EndlessPaging.

To learn more, see Data Paging.

NOTE
  • The endless paging mode cannot be enabled or disabled on a callback.
  • Endless paging is not supported when the MVC GridView extension is bound to custom data.

Online Demos

Example

Web Forms approach:

<dx:ASPxGridView ID="GridView" runat="server" DataSourceID="OrdersDataSource" Width="100%" KeyFieldName="OrderID">
    <Columns>
    ...
    </Columns>
    <Settings ShowGroupPanel="true" VerticalScrollBarMode="Visible" VerticalScrollableHeight="400" />
    <SettingsPager Mode="EndlessPaging" PageSize="20" />
</dx:ASPxGridView>

MVC approach:

@Html.DevExpress().GridView(settings => {
    settings.Name = "gridView";
    ...
    settings.Settings.VerticalScrollBarMode = ScrollBarMode.Visible;
    settings.Settings.VerticalScrollableHeight = 400;

    settings.SettingsPager.Mode = GridViewPagerMode.EndlessPaging;
    settings.SettingsPager.PageSize = 20;
    ...
}).Bind(Model).GetHtml()

Online Example

See Also