We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How can i set numeric button count without data count?

Thread ID:

Created:

Updated:

Platform:

Replies:

146941 Aug 26,2019 01:36 PM UTC Aug 27,2019 12:26 PM UTC Xamarin.Forms 1
loading
Tags: SfDataGrid
Mahmut Nedim
Asked On August 26, 2019 02:45 PM UTC

i am using the dataGrid with dataPager. I have big data that is about two thousand. So i can not get all data. i get ten datas for per page. Every change of page i get new 10 datas from server. So i have total data count and pagesize count, i want to show buttons according to as (total/pagesize). How can i do this.

For example :

I have 800 datas in server. I get 10 datas and pageSize = 10,
i want to show 80 buttons.



Balasubramani Sundaram [Syncfusion]
Replied On August 27, 2019 09:35 AM UTC

Hi Mahmut,    
   
Thank you for contacting Syncfusion support.     
   
Your requirement can be achieved through “OnDemandLoding” support in our SfDataPager. OnDemanLoading which helps to manipulate the record on the time of button click through the “OnDemandLoading” event. In the OnDemandLoading event, use the LoadDynamicItems method to load data for the corresponding page in the SfDataPager.   
   
Please refer the below sample and code snippet.   
   
Code Snippet    
[Mainpage.xaml.cs]   
   
<sfPager:SfDataPager x:Name="dataPager"   
                                 OnDemandLoading="DataPager_OnDemandLoading"   
                                 UseOnDemandPaging="True"   
                                 NumericButtonCount="10"   
                                 PageSize="10"   
                                 PageCount="80"   
                                 Grid.Row="0"   
                                 />   
   
<sfGrid:SfDataGrid Grid.Row="1"   
                               x:Name="dataGrid"                                  
                               AutoGenerateColumns="False"                              
                               ColumnSizer="Star"                                                       
                               ItemsSource="{Binding PagedSource, Source={x:Reference dataPager}}">   
    .....   
</sfGrid:SfDataGrid>   
   
[Mainpage.xaml.cs]   
   
private void DataPager_OnDemandLoading(object sender, Syncfusion.SfDataGrid.XForms.DataPager.OnDemandLoadingEventArgs e)   
{   
     dataPager.LoadDynamicItems(e.StartIndex, viewModel.OrdersInfo.Skip(e.StartIndex).Take(e.PageSize));   
}   
   
   
  
   
   
   
Please let us know, if you need any further assistance on this.   
   
Regards,
Balasubramani Sundaram 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon