<dataPager:SfDataPager x:Name ="SfDataPager"
Grid.Row="0"
PageSize="{DynamicResource DocumentsPageCount}"
NumericButtonCount="7"
Source="{Binding DocumentsCollection}"
OnDemandLoading="OnDemandPageLoading"
HorizontalOptions="FillAndExpand"
BackgroundColor="{StaticResource TpBlue}"
PageIndexChanged="SfDataPagerOnPageIndexChanged"
HeightRequest="50"
/>
[Xaml]
<Grid>
….
<sfPager:SfDataPager x:Name="dataPager"
OnDemandLoading="DataPager_OnDemandLoading"
UseOnDemandPaging="True"
NumericButtonCount="2"
PageSize="10"
PageCount="4"
Grid.Row="0"
HorizontalOptions="CenterAndExpand"/>
……
</Grid>
[cs]
private void DataPager_OnDemandLoading(object sender, Syncfusion.SfDataGrid.XForms.DataPager.OnDemandLoadingEventArgs e)
{
dataPager.LoadDynamicItems(e.StartIndex, viewModel.OrderInfoCollection.Skip(e.StartIndex).Take(e.PageSize));
} |