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

Data Grid not display record on IOS

There is no record display in the data grid on IOS once the data entry less than 8, and on android the pull to refresh is enable when only the data entry is more than 8

// My View Model Code
 public class OrderInfoRepository
    {
        private ObservableCollection<OrderInfo> orderInfo;
        public ObservableCollection<OrderInfo> OrderInfoCollection
        {
            get { return orderInfo; }
            set { this.orderInfo = value; }
        }

        public OrderInfoRepository()
        {
            //orderInfo = new ObservableCollection<OrderInfo>();
            //this.GenerateOrders();
        }

        private void GenerateOrders()
        {
//Data Entry
            orderInfo.Add(new OrderInfo(1001, "Maria Anders", "Germany", "ALFKI", "Berlin"));
            orderInfo.Add(new OrderInfo(1002, "Ana Trujilo", "Mexico", "ANATR", "México D.F."));
            orderInfo.Add(new OrderInfo(1003, "Ant Fuller", "Mexico", "ANTON", "México D.F."));
            orderInfo.Add(new OrderInfo(1004, "Thomas Hardy", "UK", "AROUT", "London"));
            orderInfo.Add(new OrderInfo(1005, "Tim Adams", "Sweden", "BERGS", "Luleå"));
            orderInfo.Add(new OrderInfo(1006, "Hanna Moos", "Germany", "BLAUS", "Mannheim"));
            orderInfo.Add(new OrderInfo(1007, "Andrew Fuller", "France", "BLONP", "Strasbourg"));
            orderInfo.Add(new OrderInfo(1008, "Martin King", "Spain", "BOLID", "Madrid"));
            //orderInfo.Add(new OrderInfo(1009, "Lenny Lin", "France", "BONAP", "Marseille"));
            //orderInfo.Add(new OrderInfo(1010, "John Carter", "Canada", "BOTTM", "Tsawassen"));
            //orderInfo.Add(new OrderInfo(1011, "Lauro King", "UK", "AROUT", "London"));
            //orderInfo.Add(new OrderInfo(1012, "Anne Wilson", "Germany", "BLAUS", "Mannheim"));
            //orderInfo.Add(new OrderInfo(1013, "Alfki Kyle", "France", "BLONP", "Strasbourg"));
            //orderInfo.Add(new OrderInfo(1014, "Gina Irene", "UK", "AROUT", "London"));
        }
    }

//Xaml
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:SQLite_Project;assembly=SQLite_Project"
             xmlns:sfgrid="clr-namespace:Syncfusion.SfDataGrid.XForms;assembly=Syncfusion.SfDataGrid.XForms"
             x:Class="SQLite_Project.Page3">
  <ContentPage.BindingContext>
    <local:OrderInfoRepository x:Name="viewModel" />
  </ContentPage.BindingContext>
  <ContentPage.Content>    

<sfgrid:SfDataGrid x:Name="dataGrid"
                       AllowSwiping="True"
                       AllowPullToRefresh="True"
                       RowHeight="70"
                       HeaderRowHeight="0"
                       AutoGenerateColumns="False"
                       ColumnSizer="Star"
                       ItemsSource="{Binding OrderInfoCollection}">

        <sfgrid:SfDataGrid.Columns>
          <sfgrid:GridTemplateColumn HeaderText=""
                                     MappingName="">
            <sfgrid:GridTemplateColumn.CellTemplate>
              <DataTemplate>
                <Frame Padding="0,0,0,0">
                  <Grid Padding="10" RowSpacing="0" >
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="*"/>
                      <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                   
                    <StackLayout Grid.Column="1">
                      <Label Text="{Binding orderID}" TextColor="#727272"/>
                      <Label Text="{Binding customerID}" TextColor="#727272"/>
                    </StackLayout>
                    <StackLayout  Grid.Column="2">
                      <Label
                        FontSize="15"
                        Text="{Binding customer, StringFormat='Queue No.: {0}'}"
                        VerticalOptions="Center"
                        HorizontalOptions="Center"
                        TextColor="#212121"/>
                      <Label
                        FontSize="9"
                        Text="{Binding shipCity}"
                        TextColor="#727272"
                        VerticalOptions="Center"
                        HorizontalOptions="Center"/>
                    </StackLayout>
                  </Grid>
                </Frame>
              </DataTemplate>
            </sfgrid:GridTemplateColumn.CellTemplate>
          </sfgrid:GridTemplateColumn>
        </sfgrid:SfDataGrid.Columns>

      </sfgrid:SfDataGrid>

  </ContentPage.Content>
</ContentPage>

1 Reply

SL Sathya Lakshmanan Syncfusion Team May 11, 2016 11:07 AM UTC

Hi Yim Suet Joe

Thank you for using Syncfusion Products.

We have considered the requirement “DataGrid not display record on iOS and Enable the pull to request issue on Android” as a defect and logged a defect report regarding this. A support incident to track the status of this issue has been created under your Syncfuison account. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents/  

Regards,
Sathya 


Loader.
Up arrow icon