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.
Unfortunately, activation email could not send to your email. Please try again.

Binding to datapager data doesn't display

Thread ID:





127819 Dec 10,2016 07:44 PM Dec 12,2016 01:28 AM Xamarin.Forms 1
Tags: SfDataGrid
Asked On December 10, 2016 07:44 PM

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 01:28 AM

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.

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.