ComponentOne ListView for ASP.NET Web Forms
C1.Web.Wijmo.Controls.45 Assembly / C1.Web.Wijmo.Controls.C1GridView Namespace / C1GridView Class / AllowCustomPaging Property

In This Topic
    AllowCustomPaging Property
    In This Topic
    Gets or sets a value that determines whether custom paging is enabled.
    Syntax
    'Declaration
     
    Public Property AllowCustomPaging As System.Boolean
    public System.bool AllowCustomPaging {get; set;}

    Property Value

    The default value is False.
    Remarks

    Set this property to True to enable custom paging.

    Paging allows you to display the contents of the C1GridView component in page segments. To enable custom paging, set both the AllowPaging and AllowCustomPaging properties to True. Next, provide code to handle the PageIndexChanged event. Create a data source that contains the data to display on a single page and then use the DataBind() method to bind the data to the C1GridView component.

    Because only a segment of the data is loaded, you must set the VirtualItemCount property to the total number of items in the C1GridView component. This allows the control to determine the total number of pages needed to display every item in the C1GridView component. This property is normally programmatically set once the total number of items in the C1GridView component is determined.

    When paging is enabled with the AllowCustomPaging property set to False, the C1GridView component assumes that the data source contains all the items to be displayed. The C1GridView component calculates the indexes of the items on the displayed page based on the page index, specified by the PageIndex property, and the number of items on a page, specified by the PageSize property.

    When the AllowCustomPaging property is set to True, the C1GridView component assumes that the data source only contains the items as determined by the VirtualItemCount property. All items up to the number of items specified by the PageSize property are displayed.

    See Also