menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfDataPager - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfDataPager

    Provides paging functionality for SfDataGrid that displays records in a paged view.

    Inheritance
    System.Object
    SfView
    SfDataPager
    Implements
    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    System.Collections.Generic.IList<Microsoft.Maui.IView>
    System.Collections.Generic.ICollection<Microsoft.Maui.IView>
    System.Collections.Generic.IEnumerable<Microsoft.Maui.IView>
    System.Collections.IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Microsoft.Maui.IVisualTreeElement
    Inherited Members
    SfView.ArrangeOverride(Rect)
    SfView.Children
    SfView.ClipToBounds
    SfView.GetSemanticsNodesCore(Double, Double)
    SfView.IDrawableLayout.DrawingOrder
    SfView.IDrawableLayout.InvalidateDrawable()
    SfView.MeasureOverride(Double, Double)
    SfView.OnBindingContextChanged()
    SfView.OnDraw(ICanvas, RectF)
    SfView.OnHandlerChanged()
    SfView.Padding
    Namespace: Syncfusion.Maui.DataGrid.DataPager
    Assembly: Syncfusion.Maui.DataGrid.dll
    Syntax
    public class SfDataPager : SfView, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider, IParentThemeElement, IThemeElement

    Constructors

    SfDataPager()

    Initializes a new instance of the SfDataPager class.

    Declaration
    public SfDataPager()

    Fields

    AutoEllipsisModeProperty

    Identifies the AutoEllipsisMode Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty AutoEllipsisModeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    AutoEllipsisTextProperty

    Identifies the AutoEllipsisText Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty AutoEllipsisTextProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ButtonCornerRadiusProperty

    Identifies the ButtonCornerRadius Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ButtonCornerRadiusProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ButtonFontSizeProperty

    Identifies the ButtonFontSize Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ButtonFontSizeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ButtonShapeProperty

    Identifies the ButtonShape Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ButtonShapeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ButtonSizeProperty

    Identifies the ButtonSize Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ButtonSizeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ButtonSpacingProperty

    Identifies the ButtonSpacing Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ButtonSpacingProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    DataPagerStyleProperty

    Identifies the DataGridStyle Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty DataPagerStyleProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    DisplayModeProperty

    Identifies the DisplayMode Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty DisplayModeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    NumericButtonCountProperty

    Identifies the NumericButtonCount Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty NumericButtonCountProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    NumericButtonsGenerateModeProperty

    Identifies the NumericButtonsGenerateMode Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty NumericButtonsGenerateModeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    OrientationProperty

    Identifies the Orientation Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty OrientationProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    PageCountProperty

    Identifies the PageCount Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty PageCountProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    PagedSourceProperty

    Identifies the PagedSource Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty PagedSourceProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    PageIndexProperty

    Identifies the PageIndex Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty PageIndexProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    PageSizeProperty

    Identifies the PageSize Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty PageSizeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    SourceProperty

    Identifies the Source Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty SourceProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    UseOnDemandPagingProperty

    Identifies the UseOnDemandPaging Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty UseOnDemandPagingProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    Properties

    AutoEllipsisMode

    Gets or sets AutoEllipsisMode, which indicates the possible ellipsis mode for the numeric button in the SfDataPager. By default, all the numeric buttons in the page will be in view.

    Declaration
    public DataPagerEllipsisMode AutoEllipsisMode { get; set; }
    Property Value
    Type
    DataPagerEllipsisMode

    AutoEllipsisText

    Gets or sets the text for the numeric button in auto ellipsis mode. By default, all the numeric buttons in the page will be in view.

    Declaration
    public string AutoEllipsisText { get; set; }
    Property Value
    Type
    System.String

    ButtonCornerRadius

    Gets or Sets the corner radius for the page buttons when is . The default value is 2.

    Declaration
    public double ButtonCornerRadius { get; set; }
    Property Value
    Type
    System.Double

    ButtonFontSize

    Gets or sets the font size of all the buttons in the SfDataPager control. The default value is 14.

    Declaration
    public double ButtonFontSize { get; set; }
    Property Value
    Type
    System.Double

    ButtonShape

    Gets or sets the shape of the buttons in the data pager. Default value is .

    Declaration
    public DataPagerButtonShape ButtonShape { get; set; }
    Property Value
    Type
    DataPagerButtonShape

    ButtonSize

    Gets or sets a value that acts as the width and height of all the buttons in the SfDataPager. The default value is 40.

    Declaration
    public double ButtonSize { get; set; }
    Property Value
    Type
    System.Double

    ButtonSpacing

    Gets or sets the spacing between the buttons when button shape is Rectangle. The default value is 8.

    Declaration
    public double ButtonSpacing { get; set; }
    Property Value
    Type
    System.Double

    DefaultStyle

    Gets or sets the datapager style, SfDataPager enables the user to customize the appearance of the pager by writing a Style

    Declaration
    public DataPagerStyle DefaultStyle { get; set; }
    Property Value
    Type
    DataPagerStyle

    DisplayMode

    Gets or sets the page display mode for the SfDataPager. The user can customize the buttons to be displayed in the pager. The default value is FirstLastPreviosNextNumeric.

    Declaration
    public DataPagerDisplayMode DisplayMode { get; set; }
    Property Value
    Type
    DataPagerDisplayMode

    NumericButtonCount

    Gets or sets the number of buttons to be displayed in the view in SfDataPager.

    Declaration
    public int NumericButtonCount { get; set; }
    Property Value
    Type
    System.Int32

    NumericButtonsGenerateMode

    Gets or sets a value indicating how the numeric buttons should be generated in the view.

    Declaration
    public DataPagerNumericButtonsGenerateMode NumericButtonsGenerateMode { get; set; }
    Property Value
    Type
    DataPagerNumericButtonsGenerateMode

    Orientation

    Gets or sets the scroll orientation of the data pager. Users can customize the pager to be scrolled vertically or horizontally. The default orientation is horizontal.

    Declaration
    public DataPagerScrollOrientation Orientation { get; set; }
    Property Value
    Type
    DataPagerScrollOrientation

    PageCount

    Gets or sets the page count, which returns the total number of pages in SfDataPager.

    Declaration
    public int PageCount { get; set; }
    Property Value
    Type
    System.Int32

    PagedSource

    Gets or sets the PagedSource of the SfDataPager, which is assigned to the item source of the SfDataGrid.

    Declaration
    public PagedCollectionView PagedSource { get; set; }
    Property Value
    Type
    PagedCollectionView

    PageIndex

    Gets or sets the page index, which indicates the current page index.

    Declaration
    public int PageIndex { get; set; }
    Property Value
    Type
    System.Int32

    PageSize

    Gets or sets the page size, used to set total number of rows to be displayed in the grid.

    Declaration
    public int PageSize { get; set; }
    Property Value
    Type
    System.Int32

    Source

    Gets or sets the items source of the SfDataPager. SfDataPager is bind to the observable collection of data. This property is set only when normal paging is used, since setting this property loads all the items to the grid initially.

    Declaration
    public IEnumerable Source { get; set; }
    Property Value
    Type
    System.Collections.IEnumerable

    UseOnDemandPaging

    Gets or sets a value indicating whether to enable/disable OnDemandPaging. SfDataPager enables the user to generate the items for the current page dynamically by using this property.

    Declaration
    public bool UseOnDemandPaging { get; set; }
    Property Value
    Type
    System.Boolean

    Methods

    ArrangeContent(Rect)

    Arranges the view.

    Declaration
    protected override Size ArrangeContent(Rect bounds)
    Parameters
    Type Name Description
    Microsoft.Maui.Graphics.Rect bounds

    The bounds of the view.

    Returns
    Type Description
    Microsoft.Maui.Graphics.Size

    Returns the size of the view.

    Overrides
    SfView.ArrangeContent(Rect)

    LoadDynamicItems(Int32, IEnumerable)

    This method dynamically loads items into the PagedSource on demand. This method is used when UseOnDemandPaging is enabled to load the items dynamically to the page only when navigating to the page.

    Declaration
    public void LoadDynamicItems(int startIndex, IEnumerable items)
    Parameters
    Type Name Description
    System.Int32 startIndex

    The start index of the items to be loaded.

    System.Collections.IEnumerable items

    The items to be loaded in the page.

    MeasureContent(Double, Double)

    Measures the DataPager.

    Declaration
    protected override Size MeasureContent(double widthConstraint, double heightConstraint)
    Parameters
    Type Name Description
    System.Double widthConstraint

    The Width.

    System.Double heightConstraint

    The Height.

    Returns
    Type Description
    Microsoft.Maui.Graphics.Size

    It returns the size.

    Overrides
    SfView.MeasureContent(Double, Double)

    MoveToFirstPage()

    Moves to the first page. This method is used to navigate to the first page programmatically.

    Declaration
    public void MoveToFirstPage()

    MoveToLastPage()

    Moves to the last page. This method is used to navigate to the last page programmatically.

    Declaration
    public void MoveToLastPage()

    MoveToNextPage()

    Moves to the next page. This method is used to navigate to the next page programmatically.

    Declaration
    public void MoveToNextPage()

    MoveToPage(Int32)

    Moves to the given page index. This method is used to navigate to the desired page programmatically.

    Declaration
    public void MoveToPage(int pageIndex)
    Parameters
    Type Name Description
    System.Int32 pageIndex

    The page index to move to.

    MoveToPage(Int32, Int32, Boolean)

    Moves to the given page index. This method is used to navigate to the desired page programmatically from the current page.

    Declaration
    public void MoveToPage(int oldPageIndex, int pageIndex, bool animateScrolling = false)
    Parameters
    Type Name Description
    System.Int32 oldPageIndex

    The old page index which represents the current page index.

    System.Int32 pageIndex

    The page index to move to.

    System.Boolean animateScrolling

    The value indicating whether scrolling can animated.

    MoveToPreviousPage()

    Moves to the previous page. This method is used to navigate to the previous page programmatically.

    Declaration
    public void MoveToPreviousPage()

    OnPropertyChanged(String)

    Called when the property of DataPager is changed.

    Declaration
    protected override void OnPropertyChanged(string propertyName = null)
    Parameters
    Type Name Description
    System.String propertyName

    Refresh()

    Refresh the SfDataPager in runtime.

    Declaration
    public void Refresh()

    Events

    OnDemandLoading

    Declaration
    public event EventHandler<OnDemandLoadingEventArgs> OnDemandLoading
    Event Type
    Type
    System.EventHandler<OnDemandLoadingEventArgs>

    PageChanged

    Declaration
    public event EventHandler<PageChangedEventArgs> PageChanged
    Event Type
    Type
    System.EventHandler<PageChangedEventArgs>

    PageChanging

    Declaration
    public event EventHandler<PageChangingEventArgs> PageChanging
    Event Type
    Type
    System.EventHandler<PageChangingEventArgs>

    Implements

    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    System.Collections.Generic.IList<>
    System.Collections.Generic.ICollection<>
    System.Collections.Generic.IEnumerable<>
    System.Collections.IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Microsoft.Maui.IVisualTreeElement
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved