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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Binding to datapager data doesn't display

Thread ID:





127819 Dec 11,2016 12:44 AM UTC Dec 12,2016 06:28 AM UTC Xamarin.Forms 1
Tags: SfDataGrid
Asked On December 11, 2016 12:44 AM UTC

Hi I have followed the examples here to try and create paging in my datagrid. The paging controls show and I have bound to the pager in the code behind but my datagrid shows nothing. Any help appreciated. (PlayerList is an ObservableCollection)

public MainView()
            this.PlayerDataGrid.ItemsSource = sfDataPager.PagedSource;

        <StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
            <Grid HorizontalOptions="FillAndExpand"  VerticalOptions="FillAndExpand">
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />

            <sfpager:SfDataPager x:Name ="sfDataPager"
                           HeightRequest ="50"
                           Source="{Binding PlayerList}">
                <datagrid:SfDataGrid x:Name="PlayerDataGrid"
                                     AllowPullToRefresh ="True"
                                    PullToRefreshCommand="{Binding RefreshCommand}"
                                     IsBusy="{Binding IsBusy}"
                    <datagrid:SfDataGrid.Columns x:TypeArguments="syncfusion:Columns">
                        <datagrid:GridTextColumn HeaderText="Name" 
                                             MappingName="FirstName" />
                        <datagrid:GridTextColumn HeaderText="Surname"
                                             MappingName="LastName" />
                        <datagrid:GridTextColumn HeaderText="Guardian" 
                                             MappingName="ParentFName" />
                        <datagrid:GridTextColumn HeaderText="Phone"
                                             MappingName="PhoneNum" />
                        <datagrid:GridTextColumn HeaderText="Team"

                        <datagrid:SortColumnDescription ColumnName="FirstName" 
                                          SortDirection="Ascending" />
                        <datagrid:SortColumnDescription ColumnName="LastName" 
                                          SortDirection="Ascending" />
                        <datagrid:SortColumnDescription ColumnName="PlayersTeam.TeamName" 
                                          SortDirection="Ascending" />


Divakar Subramaniam [Syncfusion]
Replied On December 12, 2016 06:28 AM UTC

Hi Ciaran, 
Thanks for contacting Syncfusion Support. 
We have checked your query and we were not able to reproduce the reported issue on our side. We have prepared a simple sample using SfDataPager and SfDataGrid controls and also applied the code you have provided in your update and the SfDatagrid was loading fine with data. 
We have attached our sample for your sample and you can download the same from the below link. 
Please ensure that in order to load the SfDataGid in Forms.iOS platform, you need to initialize the SfDataGrid in Forms.iOS project as like in below code snippet. 
// In AppDelegate.cs 
using Syncfusion.SfDataGrid.XForms.iOS; 
public override bool FinishedLaunching(UIApplication app, NSDictionary options) 
    LoadApplication(new App()); 
    return base.FinishedLaunching(app, options); 


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