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. Image for the cookie policy date

Centering SfDataPager buttons

Hi,

I am currently trying to use the SfDataPager, and I wanted to center the buttons on my page based on how many buttons are displayed, but I can't seem to be able to do it.

My problem occurs on these devices :
- LG G4 on Android 6.0
- Panasonic FZ-N1 on Android 8.1

I've included a sample project showing my issue. Is there anything I am missing to make it work?

Attachment: SfGridSample_ec40b60f.zip

2 Replies

BS Balasubramani Sundaram Syncfusion Team November 7, 2019 07:12 AM

Hi Maxence, 
   
Thank you for contacting Syncfusion support.   
  
Currently, we are validating the reported issue “Centering SfDataPager buttons”. We will validate and update you further details on November 8th, 2019. We appreciate your patience until then.          
 
Regards,
Balasubramani Sundaram. 



BS Balasubramani Sundaram Syncfusion Team November 8, 2019 10:21 AM

Hi Maxence,  
 
Thank you for your patience,  
 
We have fully provided the support for customizing the SfDataPager “LayoutOptions” in our 2019 Volume 3 SP1 in version of “17.3.0.26”. Please upgrade the Syncfusion NuGet to achieve your requirement. 
 
On your provided code snippet, you have set the “PageCount” but if it’s not needs when we are using the normal page. If we use the OnDemandLoding support in SfDataPager mean, we have set the PageCount. 
 
Please follow the refer the below code snippet and sample,  
 
Code Snippet [C#] 
<Grid> 
     <Grid.RowDefinitions> 
         <RowDefinition Height="Auto" /> 
         <RowDefinition Height="*" /> 
     </Grid.RowDefinitions> 
     <StackLayout Grid.Row="0"> 
         <sfPager:SfDataPager x:Name="dataPager" 
                         Source="{Binding OrderInfoCollection}" 
                         NumericButtonCount="1" 
                         PageSize="10" 
                         DisplayMode="PreviousNextNumeric"                                
                         HorizontalOptions="CenterAndExpand"/> 
     </StackLayout> 
     <sfGrid:SfDataGrid Grid.Row="1" 
                        x:Name="dataGrid"                                
                        AutoGenerateColumns="False"                            
                        ColumnSizer="Star"   
                        ItemsSource="{Binding PagedSource, Source={x:Reference dataPager}}"> 
         <sfGrid:SfDataGrid.Columns> 
             <sfGrid:GridNumericColumn MappingName="OrderID"/> 
             <sfGrid:GridTextColumn MappingName="CustomerID"/> 
             <sfGrid:GridTextColumn MappingName="ShipCity"/> 
             <sfGrid:GridTextColumn MappingName="ShipCountry"/> 
         </sfGrid:SfDataGrid.Columns> 
     </sfGrid:SfDataGrid> 
 </Grid> 
 
 
 
 
 
Note: Requirement has been checked with Xamarin. Forms version 3.6 and Syncfusion NuGet version 17.3.0.26.  
 
We hope this helps. Please let us know, if you need any further assistance. 
 
Regards,  
Balasubramani Sundaram. 


Loader.
Live Chat Icon For mobile
Up arrow icon