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

No method 'OfType' exists on type 'System.Linq.Queryable'. in iOS.

An exception is thrown when I try to use a Summary Row.  No method 'OfType' exists on type 'System.Linq.Queryable'.
The sample that you provide in your documentation fails.


public MyReport()
        {
            InitializeComponent();
            dataGrid.GroupColumnDescriptions.Add(new GroupColumnDescription() { ColumnName = "nom_cte" });

            GridSummaryRow summaryRow = new GridSummaryRow();
            summaryRow.Title = "Total Salary: {TotalSalary}";
            summaryRow.ShowSummaryInRow = true;
            summaryRow.SummaryColumns.Add(new GridSummaryColumn
            {
                Name = "TotalSalary",
                MappingName = "salary",
                Format = "({Sum:c})",
                SummaryType = SummaryType.DoubleAggregate
            });
            dataGrid.CaptionSummaryRow = summaryRow;

        }

I didn't test this in UWP., but this works in Android. This doesn't work in iOS (tested with Simulator iPhone 6 iOS 9.3, in Debug mode and using include "SDK assembbly only") and in my mac I have installed Xcode 7.3.1.
I'm using the most recent and stable version of SfDatagrid 14.4.0.20.

1 Reply

DS Divakar Subramaniam Syncfusion Team January 6, 2017 05:59 AM UTC

Hi Ian, 
 
Sorry for the inconvenience caused. 
 
We have checked your query. This is known framework issue in Xamarin.Forms.iOS due to Linker problem. We have reported the problem already in Bugzilla and you can refer the below link for more details. 
 
 
 
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. 
 
 
 
Also, we have attached a simple sample by resolved your query and you can download the same from the below link. 
 
 
Regards, 
Divakar. 


Loader.
Live Chat Icon For mobile
Up arrow icon