Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]ASP.NET WebForms Controls
 [Collapse]ASP.NET MVC Extensions
  [Expand]Product Information
  [Expand]Getting Started
  [Expand]Common Concepts
  [Collapse]Grid View
    Overview - GridView
    Main Features - GridView
   [Collapse]Concepts
    [Expand]Binding to Data
    [Expand]Data Representation Basics
    [Collapse]Focus and Navigation
      Focused Row
      Selection
     [Collapse]Paging and Scrolling
       Data Paging
       SEO Paging
       Endless Paging
       Vertical Scrolling
       Virtual Scrolling
       Horizontal Scrolling
      Keyboard Navigation
    [Expand]Data Editing and Validation
    [Expand]Export Overview
   [Expand]Visual Elements
   [Expand]Examples
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]HTML Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Navigation and Layout Extensions
  [Expand]File Management
  [Expand]Multi-Use Site Extensions
  [Expand]Charts
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Tree List
  [Expand]Data Editor Extensions
  [Expand]Report Extensions
  [Expand]SpellChecker
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Data Paging

This topic describes the concept of data paging, including an overview of the paging functionality, appearance customization, as well as how to navigate pages on the server and client sides.

Expanded Data Paging Overview

By default, GridView automatically splits content across multiple pages and provides end-users with an embedded page navigation UI - Pager.

The built-in pager enables end-users to navigate through GridView data. It consists of the following navigation buttons: Next, Last, Previous, First and All. It also includes an indicator that displays the current page number and the total number of pages, and a page size item allowing you to specify the maximum number of rows that can be displayed within a page. To access and customize pager settings, use the GridViewSettings.SettingsPager property.

To disable page navigation and display all rows within the grid, set the ASPxGridViewPagerSettings.Mode (via GridViewSettings.SettingsPager.Mode) property to GridViewPagerMode.ShowAllRecords.

Expanded Appearance Customization

The pager can be displayed above or below the rows, or on both sides. Use the ASPxGridPagerSettings.Position (via GridViewSettings.SettingsPager.Position) property to specify the pager's position within the GridView.

The maximum number of rows that can be displayed within a page can be accessed using the ASPxGridViewPagerSettings.PageSize (via GridViewSettings.SettingsPager.PageSize) property.

The GridView's look and feel can be customized with Templates. A template is a set of HTML elements and ASP.NET MVC extensions that define the layout for a particular element within the ASP.NET MVC extension (e.g., a pager). When the extension runs in the web page, template content is rendered in place of the default HTML for the extension.

Example

The code sample below demonstrates how to implement a custom pager using the templates.

Partial View code:

The image below illustrates the result.

Expanded Page Navigation on the Server Side

The active page is identified by the ASPxGridBase.PageIndex (via MVCxGridView.PageIndex) property. Use this property to switch between pages in code. The total number of pages can be obtained using the ASPxGridBase.PageCount (via MVCxGridView.PageCount) property.

Example

The code sample below demonstrates how to define the initially displayed page on the first start.

Partial View code:

The image below illustrates the result.

Expanded Page Navigation on the Client Side

GridView provides a client-side API that enables you to navigate a user to a specific page. The table below lists the available selection-related methods.

Method Description
ASPxClientGridView.GotoPage Selects the specified page.
ASPxClientGridView.NextPage Activates the next page.
ASPxClientGridView.PrevPage Activates the previous page.

Example

The example below demonstrates how to enable an end-user to navigate to any GridView page without clicking the pager. In this example, an end-user can use the SpinEdit editor to specify (by entering the number manually or by clicking the spin buttons) the page number to which the grid should be paged.

View Code:

Partial View code:

The image below illustrates the result.

How would you rate this topic?​​​​​​​