Class SfDataPager
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.Controls.DataPager
Assembly: Syncfusion.SfGrid.WPF.dll
Syntax
public class SfDataPager : Control, IDisposable
Constructors
SfDataPager()
Declaration
public SfDataPager()
Fields
AccentBackgroundProperty
Identifies the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.AccentBackground dependency property.
Declaration
public static readonly DependencyProperty AccentBackgroundProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.AccentBackground dependency property.
AccentForegroundProperty
Identifies the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.AccentForeground dependency property.
Declaration
public static readonly DependencyProperty AccentForegroundProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.AccentForeground dependency property.
AutoEllipsisModeProperty
Identifies the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.AutoEllipsisMode dependency property.
Declaration
public static readonly DependencyProperty AutoEllipsisModeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.AutoEllipsisMode dependency property.
AutoEllipsisTextProperty
Identifies the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.AutoEllipsisText dependency property.
Declaration
public static readonly DependencyProperty AutoEllipsisTextProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.AutoEllipsisText dependency property.
DisplayModeProperty
Identifies the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.DisplayMode dependency property.
Declaration
public static readonly DependencyProperty DisplayModeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.DisplayMode dependency property.
NumericButtonCountProperty
Identifies the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.NumericButtonCount dependency property.
Declaration
public static readonly DependencyProperty NumericButtonCountProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.NumericButtonCount dependency property.
NumericButtonStyleProperty
Identifies the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.NumericButtonStyle dependency property.
Declaration
public static readonly DependencyProperty NumericButtonStyleProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.NumericButtonStyle dependency property.
OrientationProperty
Identifies the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.Orientation dependency property.
Declaration
public static readonly DependencyProperty OrientationProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.Orientation dependency property.
PageCountProperty
Identifies the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.PageCount dependency property.
Declaration
public static readonly DependencyProperty PageCountProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.PageCount dependency property.
PagedSourceProperty
Identifies the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.PagedSource dependency property.
Declaration
public static readonly DependencyProperty PagedSourceProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.PagedSource dependency property.
PageIndexProperty
Identifies the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.PageIndex dependency property.
Declaration
public static readonly DependencyProperty PageIndexProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.PageIndex dependency property.
PageSizeProperty
Identifies the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.PageSize dependency property.
Declaration
public static readonly DependencyProperty PageSizeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.PageSize dependency property.
SourceProperty
Identifies the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.Source dependency property.
Declaration
public static readonly DependencyProperty SourceProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.Source dependency property.
UseOnDemandPagingProperty
Identifies the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.UseOnDemandPaging dependency property.
Declaration
public static readonly DependencyProperty UseOnDemandPagingProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Controls.DataPager.SfDataPager.UseOnDemandPaging dependency property.
Properties
AccentBackground
Gets or sets the background of selected page button and navigation buttons.
Declaration
public Brush AccentBackground { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | The brush that highlights the background of selected page button and navigation buttons. The default value is DarkGray. |
AccentForeground
Gets or sets the foreground of selected page button and navigation buttons.
Declaration
public Brush AccentForeground { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | The brush that highlights the foreground of selected page button and navigation buttons. The default value is White. |
AutoEllipsisMode
Gets or sets a value that indicates how the auto ellipsis button are displayed in SfDataPager to navigate the next set of pages when PageCount is greater than the NumericButtonCount.
Declaration
public AutoEllipsisMode AutoEllipsisMode { get; set; }
Property Value
Type | Description |
---|---|
AutoEllipsisMode | One of the AutoEllipsisMode enumeration that specifies how the auto ellipsis button are displayed in SfDataPager.
The default value is |
Remarks
When the PageCount is greater than the NumericButtonCount, auto ellipsis button will be displayed. AutoEllipsisText
AutoEllipsisText
Gets or sets the text that needs to be displayed in auto ellipsis button.
Declaration
public string AutoEllipsisText { get; set; }
Property Value
Type | Description |
---|---|
System.String | The text content which needs to be displayed in the auto ellipsis button. The default value is ... |
Remarks
When the PageCount is greater than the NumericButtonCount, you can display the auto ellipsis button by setting AutoEllipsisMode.
DisplayMode
Gets or sets a value that defines the button to be displayed in SfDataPager.
Declaration
public PageDisplayMode DisplayMode { get; set; }
Property Value
Type | Description |
---|---|
PageDisplayMode | One of the |
Remarks
The numeric and navigation buttons can be displayed in different ways using
EnableGridPaging
Declaration
public bool EnableGridPaging { get; set; }
Property Value
Type |
---|
System.Boolean |
NumericButtonCount
Gets or sets the number of numeric button that needs to be displayed in SfDataPager.
Declaration
public int NumericButtonCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | Number of numeric buttons. |
Remarks
Based on the PageSize, total number of pages will be created. If the PageCount is greater than 5, only five numeric buttons will be displayed and it can be changed by using this property.
NumericButtonStyle
Gets or sets the style applied to all the numeric button in SfDataPager.
Declaration
public Style NumericButtonStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Style | The style that is applied to all the numeric button in SfDataPager. The default value is null. |
Remarks
To define a System.Windows.Style for a numeric button, specify a TargetType of
Orientation
Gets or sets a value that indicates the dimension by which child elements are stacked.
Declaration
public Orientation Orientation { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Controls.Orientation | One of the System.Windows.Controls.Orientation enumeration that specifies the orientation of SfDataPager. The default value is System.Windows.Controls.Orientation.Horizontal. |
PageCount
Gets or sets the page count when OnDemandPaging is enabled.
Declaration
public int PageCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | Number of pages to be displayed when OnDemandPaging is enabled. The default value is zero. |
Remarks
Specify the number of pages the data needs to populate when UseOnDemandPaging is enabled.
PagedSource
Gets or sets the collection that is used to bind the SfDataPager source to other elements.
Declaration
public PagedCollectionView PagedSource { get; set; }
Property Value
Type | Description |
---|---|
PagedCollectionView | The collection that is used to bind the SfDataPager to other elements. |
PageIndex
Gets or sets the index of selected page in SfDataPager.
Declaration
public int PageIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | Index of selected page in SfDataPager. The default value is zero. |
PageSize
Gets or sets the number of records to display on a page in SfDataPager.
Declaration
public int PageSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of records to display on a single page. The default value is zero. |
Remarks
Based on PageSize, the total number of pages will be created. When the PageSize is not specified, all the records will be displayed in a single page.
Source
Gets or sets a collection that is used to generate the content of the SfDataPager.
Declaration
public IEnumerable Source { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.IEnumerable | The collection that is used to generate the content of the SfDataPager. The default value is null. |
Remarks
No need to set the Source when UseOnDemandPaging is enabled.
UseOnDemandPaging
Declaration
public bool UseOnDemandPaging { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
add_OnDemandLoading(OnDemandLoadingEventHandler)
Declaration
public void add_OnDemandLoading(OnDemandLoadingEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
OnDemandLoadingEventHandler | value |
add_PageIndexChanged(PageIndexChangedEventhandler)
Declaration
public void add_PageIndexChanged(PageIndexChangedEventhandler value)
Parameters
Type | Name | Description |
---|---|---|
PageIndexChangedEventhandler | value |
add_PageIndexChanging(PageIndexChangingEventhandler)
Declaration
public void add_PageIndexChanging(PageIndexChangingEventhandler value)
Parameters
Type | Name | Description |
---|---|---|
PageIndexChangingEventhandler | value |
Dispose()
Disposes all the resources used by the
Declaration
public void Dispose()
Dispose(Boolean)
Disposes all the resources used by the
Declaration
protected virtual void Dispose(bool isDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isDisposing | Indicates whether the call is from Dispose method or from a finalizer. |
LoadDynamicItems(Int32, IEnumerable)
Loads the ItemsSource for corresponding page.
Declaration
public void LoadDynamicItems(int startIndex, IEnumerable items)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | startIndex | Index based on PageIndex which is ( Number of previous pages * PageSize). |
System.Collections.IEnumerable | items | ItemsSource to load |
Remarks
This method can be used when OnDemandPaging technique is used to load the data.
MoveToFirstPage()
Navigate to the first page.
Declaration
public void MoveToFirstPage()
MoveToLastPage()
Navigate to the last page.
Declaration
public void MoveToLastPage()
MoveToNextPage()
Move to the next page.
Declaration
public void MoveToNextPage()
MoveToPage(Int32)
Navigate to the particular page based on PageIndex.
Declaration
public void MoveToPage(int pageIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | pageIndex | Index of the page to be navigate. |
MoveToPreviousPage()
Navigate to the previous page.
Declaration
public void MoveToPreviousPage()
OnApplyTemplate()
Declaration
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type |
---|
System.Windows.Automation.Peers.AutomationPeer |
OnKeyDown(KeyEventArgs)
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.KeyEventArgs | e |
OnManipulationCompleted(ManipulationCompletedEventArgs)
Declaration
protected override void OnManipulationCompleted(ManipulationCompletedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.ManipulationCompletedEventArgs | e |
OnManipulationStarted(ManipulationStartedEventArgs)
Declaration
protected override void OnManipulationStarted(ManipulationStartedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.ManipulationStartedEventArgs | e |
OnMouseEnter(MouseEventArgs)
Declaration
protected override void OnMouseEnter(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseEventArgs | e |
OnMouseLeave(MouseEventArgs)
Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseEventArgs | e |
remove_OnDemandLoading(OnDemandLoadingEventHandler)
Declaration
public void remove_OnDemandLoading(OnDemandLoadingEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
OnDemandLoadingEventHandler | value |
remove_PageIndexChanged(PageIndexChangedEventhandler)
Declaration
public void remove_PageIndexChanged(PageIndexChangedEventhandler value)
Parameters
Type | Name | Description |
---|---|---|
PageIndexChangedEventhandler | value |
remove_PageIndexChanging(PageIndexChangingEventhandler)
Declaration
public void remove_PageIndexChanging(PageIndexChangingEventhandler value)
Parameters
Type | Name | Description |
---|---|---|
PageIndexChangingEventhandler | value |
UnWireEvents()
Declaration
public void UnWireEvents()
WireEvents()
Declaration
public void WireEvents()
Events
OnDemandLoading
Occurs when the pager moves to corresponding page and load the data in on-demand.
Declaration
public event OnDemandLoadingEventHandler OnDemandLoading
Event Type
Type |
---|
OnDemandLoadingEventHandler |
Remarks
PageIndexChanged
Occurs once the pages are navigated.
Declaration
public event PageIndexChangedEventhandler PageIndexChanged
Event Type
Type |
---|
PageIndexChangedEventhandler |
PageIndexChanging
Occurs while navigating between the pages.
Declaration
public event PageIndexChangingEventhandler PageIndexChanging
Event Type
Type |
---|
PageIndexChangingEventhandler |
Remarks
Page navigation can be skipped by using PageIndexChanging event.