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

Crash when launching application on Ipad

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.

3 Replies

AN Ashok N Syncfusion Team September 29, 2016 06:20 AM UTC

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  



DS David Smith October 6, 2018 09:09 PM UTC

It is great that I have found a discussion about an interesting topic as I was a lot anxious about knowing about this new software. Consult with Apple Support if you want to know more about this. 



VR Vigneshkumar Ramasamy Syncfusion Team October 8, 2018 10:23 AM UTC

Hi David Smith 
 
Thanks for your suggestion. We will cosult Apple Support for more details about the reported issue.. 
 
Regards 
Vigneshkumar R 


Loader.
Live Chat Icon For mobile
Up arrow icon