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.

Crash when launching application on Ipad

Thread ID:

Created:

Updated:

Platform:

Replies:

126166 Sep 28,2016 05:21 AM Sep 29,2016 02:20 AM Xamarin.iOS 1
loading
Tags: SfDataGrid
Maxime
Asked On September 28, 2016 05:21 AM

Hi !

I try to use SfDatagrid for a Cross Platform application. It's work very well on Android but I have an issue when the application is launched on an Ipad.

I encountering the following error message: "System.InvalidOperationException: No method 'Count' exists on type 'System.Linq.Queryable'."

Below, some informations concerning the used code:

PCL: MainPage.xaml

<syncfusion:SfDataGrid x:Name="dataGrid" ColumnSizer="LastColumnFill" ItemsSource="{Binding Data}" AutoGenerateColumns="False" AllowSorting="True" VerticalOptions="FillAndExpand">

          <syncfusion:SfDataGrid.Columns x:TypeArguments="syncfusion:Columns">
            <syncfusion:GridTextColumn HeaderText="Nom"
                                       MappingName="nom" />
            <syncfusion:GridTextColumn HeaderText="Prénom"
                                       MappingName="prenom" />
            <syncfusion:GridTextColumn HeaderText="Âge"
                                       MappingName="age" />
            <syncfusion:GridTextColumn HeaderText="Poste"
                                       MappingName="poste" />
          </syncfusion:SfDataGrid.Columns>

          <syncfusion:SfDataGrid.SortColumnDescriptions>
            <syncfusion:SortColumnDescription ColumnName="nom" />
          </syncfusion:SfDataGrid.SortColumnDescriptions>

        </syncfusion:SfDataGrid>

IOS: AppDelegate.cs

[Register("AppDelegate")]
    public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
    {
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();

            new SfChartRenderer();

            SfDataGridRenderer.Init();

            LoadApplication(new App());

            return base.FinishedLaunching(app, options);
        }
    }

Can you tell me how fix this issue ? 

Waiting for your reply.
Maxime.

Ashok N [Syncfusion]
Replied On September 29, 2016 02:20 AM

Hi Maxime, 

This is known framework issue in Xamarin.Forms.iOS due to Linker problem. We have reported the problem in Bugzilla and it seem to have broken again.  
  
  
Workaround:  
   
If you use SfDataGrid with LinkerBehavior Link Framework SDKs only”, the exception you have mentioned will be throw. However, you can able to overcome this error in two ways.   
1.     By setting LinkerBehavior as “Don’t Link   
2.     By setting custom linker argument in iOS renderer project as like in below screenshot,  
  
  
   
  
Please refer the below KB link for more details regarding the issue and its workaround.  
  
  
Regards,  
Ashok  


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.

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.

;