ComponentOne GridView for ASP.NET WebForms
Working with GridView for ASP.NET Web Forms / Paging
In This Topic
    Paging
    In This Topic

    The C1GridView control provides built-in data paging functionality without requiring any coding. By default the grid is displayed in one continuous window. If you choose, you can display the grid on multipage "pages". If paging is set, at run time users can navigate each page of the grid through buttons or links at the top or bottom of the grid. For an example of adding paging, see the Creating a Pageable Grid topic.

    To be able to page data at run time, the AllowPaging property must be set to True (by default this is False). When PagerSettings.Visible is True paging navigation appears by default at the bottom of the grid in the grid's footer. You can change the position of the paging controls, if you choose, by setting the Position property. By default, 10 items appear on each page of the grid. You can change this number, by setting the PageSize property. For example, in the image below the PageSize has been set to 5.

    By default the paging controls appear as numeric links:

    You can change the appearance of the paging controls by setting the Mode property. You can set the Mode property to the following options:

    Mode Description
    NextPrevious A set of pagination controls consisting of Previous and Next buttons.
    Numeric(default) A set of pagination controls consisting of numbered link buttons to access pages directly.
    NextPreviousFirstLast A set of pagination controls consisting of Previous, Next, First, and Last buttons.
    NumericFirstLast A set of pagination controls consisting of numbered and First and Last link buttons.

    To customize the pager controls, you can set the PagerSettings. The paging properties are easily accessed at design time on the Paging tab of the Property builder (the C1GridView Properties dialog box).

    You can use AJAX to update the grid when the user pages the grid at run time by setting the Action property. For more information, see Paging the Grid.

    See Also