alexa
menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download

    Show / Hide Table of Contents

    Class EnumerablePagedSource

    A page-sliced, observable collection that can be consumed by any target grid control other than , such as Microsoft.Maui.Controls.CollectionView. It exposes the current page of items and updates when SfDataPager navigates. This implementation does not extend PagedCollectionView to avoid conflicts with framework CollectionView binding, but provides all the same properties and methods that the DataPager requires for paging functionality.

    Inheritance
    System.Object
    EnumerablePagedSource
    Implements
    System.Collections.Specialized.INotifyCollectionChanged
    System.ComponentModel.INotifyPropertyChanged
    System.Collections.IEnumerable
    System.Collections.Generic.IEnumerable<System.Object>
    Namespace: Syncfusion.Maui.DataPager
    Assembly: Syncfusion.Maui.DataPager.dll
    Syntax
    public class EnumerablePagedSource : Object, IPagedSource, INotifyCollectionChanged, INotifyPropertyChanged, IEnumerable, IEnumerable<object>

    Constructors

    EnumerablePagedSource(IEnumerable, Int32)

    Initializes a new instance of the EnumerablePagedSource class.

    Declaration
    public EnumerablePagedSource(IEnumerable source, int pageSize = 0)
    Parameters
    Type Name Description
    System.Collections.IEnumerable source

    The underlying source sequence.

    System.Int32 pageSize

    The default page size to use for the initial page slice.

    Properties

    Count

    Gets the number of items in the current page.

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

    CurrentPage

    Gets the current page's items as a stable, observable collection. Bound controls such as Microsoft.Maui.Controls.CollectionView can iterate this collection directly when binding.

    Declaration
    public ObservableCollection<object> CurrentPage { get; }
    Property Value
    Type
    System.Collections.ObjectModel.ObservableCollection<System.Object>

    ItemCount

    Gets the number of items in the current page.

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

    MaxItemsCount

    Gets or sets the maximum number of items.

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

    PageCount

    Gets the total number of pages.

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

    PageIndex

    Gets the zero-based index of the current page.

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

    PageSize

    Gets or sets the number of items per page.

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

    UseOnDemandPaging

    Gets or sets a value indicating whether on-demand paging is used.

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

    Methods

    GetEnumerator()

    Returns an enumerator that iterates through the current page.

    Declaration
    public IEnumerator GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    An enumerator for the current page.

    LoadDynamicItems(Int32, IEnumerable)

    Loads items dynamically for on-demand paging.

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

    The zero-based start index of the items.

    System.Collections.IEnumerable items

    The items to load into the current page.

    MoveToPage(Int32)

    Moves to the specified page index.

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

    The zero-based page index to move to.

    Returns
    Type Description
    System.Boolean

    True if the page change succeeded; otherwise, false.

    Events

    CollectionChanged

    Occurs when the collection changes.

    Declaration
    public event NotifyCollectionChangedEventHandler CollectionChanged
    Event Type
    Type
    System.Collections.Specialized.NotifyCollectionChangedEventHandler

    OnDemandItemsLoading

    Occurs when on-demand paging requests data.

    Declaration
    public event EventHandler<OnDemandItemsLoadingEventArgs> OnDemandItemsLoading
    Event Type
    Type
    System.EventHandler<OnDemandItemsLoadingEventArgs>

    PropertyChanged

    Occurs when a property value changes.

    Declaration
    public event PropertyChangedEventHandler PropertyChanged
    Event Type
    Type
    System.ComponentModel.PropertyChangedEventHandler

    Implements

    System.Collections.Specialized.INotifyCollectionChanged
    System.ComponentModel.INotifyPropertyChanged
    System.Collections.IEnumerable
    System.Collections.Generic.IEnumerable<>
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved