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
close icon

SfDataGrid.GetRequiredHeightForGrid Crash on Android in version V16.4.0.44

I have sfDataGrid defined as below and it crashes in the latest version. it works on older versions


   <sfgrid:SfDataGrid ScrollingMode="PixelLine" HorizontalOptions="FillAndExpand"  
                         x:Name="dataGrid"                        
                         AutoGenerateColumns="False"
                         AllowSorting="True"                      
                         ColumnSizer="Auto"                           
                         RowHeight="30"                        
                         AllowSwiping="False"   
                           GridLongPressed="dataGrid_GridLongPressed" 
                         SelectionMode="Single"   ItemsSource="{Binding  Items}">
                <sfgrid:SfDataGrid.Columns x:TypeArguments="syncfusion:Columns">
                    <sfgrid:GridTextColumn HeaderText="name" IsHidden="True" MappingName="name" />

Stacktrace:

  • SfDataGrid.GetRequiredHeightForGrid ()
  • SfDataGrid.OnSizeAllocated (System.Double width, System.Double height)
  • VisualElement.SizeAllocated (System.Double width, System.Double heightD:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:801
  • VisualElement.SetSize (System.Double width, System.Double heightD:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:1033
  • VisualElement.set_Bounds (Xamarin.Forms.Rectangle valueD:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:277
  • VisualElement.Layout (Xamarin.Forms.Rectangle boundsD:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:687
  • Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle regionD:\a\1\s\Xamarin.Forms.Core\Layout.cs:177
  • Grid.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double heightD:\a\1\s\Xamarin.Forms.Core\GridCalc.cs:48
  • Layout.UpdateChildrenLayout () D:\a\1\s\Xamarin.Forms.Core\Layout.cs:263
  • Layout.OnSizeAllocated (System.Double width, System.Double heightD:\a\1\s\Xamarin.Forms.Core\Layout.cs:223
  • VisualElement.SizeAllocated (System.Double width, System.Double heightD:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:801
  • VisualElement.SetSize (System.Double width, System.Double heightD:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:1033
  • VisualElement.set_Bounds (Xamarin.Forms.Rectangle valueD:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:277
  • VisualElement.Layout (Xamarin.Forms.Rectangle boundsD:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:687
  • Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.View child, Xamarin.Forms.Rectangle region, Xamarin.Forms.SizeRequest childSizeRequestD:\a\1\s\Xamarin.Forms.Core\Layout.cs:318
  • StackLayout.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double heightD:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:66
  • Layout.UpdateChildrenLayout () D:\a\1\s\Xamarin.Forms.Core\Layout.cs:263
  • Layout.OnSizeAllocated (System.Double width, System.Double heightD:\a\1\s\Xamarin.Forms.Core\Layout.cs:223
  • VisualElement.SizeAllocated (System.Double width, System.Double heightD:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:801
  • VisualElement.SetSize (System.Double width, System.Double heightD:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:1033
  • VisualElement.set_Bounds (Xamarin.Forms.Rectangle valueD:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:277
  • VisualElement.Layout (Xamarin.Forms.Rectangle boundsD:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:687
  • Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle regionD:\a\1\s\Xamarin.Forms.Core\Layout.cs:177
  • Page.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double heightD:\a\1\s\Xamarin.Forms.Core\Page.cs:189
  • Page.UpdateChildrenLayout () D:\a\1\s\Xamarin.Forms.Core\Page.cs:264
  • Page.OnSizeAllocated (System.Double width, System.Double heightD:\a\1\s\Xamarin.Forms.Core\Page.cs:245
  • VisualElement.SizeAllocated (System.Double width, System.Double heightD:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:801
  • VisualElement.SetSize (System.Double width, System.Double heightD:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:1033
  • VisualElement.set_Bounds (Xamarin.Forms.Rectangle valueD:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:277
  • VisualElement.Layout (Xamarin.Forms.Rectangle boundsD:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:687
  • Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle regionD:\a\1\s\Xamarin.Forms.Core\Layout.cs:146
  • Page.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double heightD:\a\1\s\Xamarin.Forms.Core\Page.cs:189
  • Page.UpdateChildrenLayout () D:\a\1\s\Xamarin.Forms.Core\Page.cs:264
  • Page.OnSizeAllocated (System.Double width, System.Double heightD:\a\1\s\Xamarin.Forms.Core\Page.cs:245
  • VisualElement.SizeAllocated (System.Double width, System.Double heightD:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:801
  • Page.OnChildMeasureInvalidated (Xamarin.Forms.VisualElement child, Xamarin.Forms.Internals.InvalidationTrigger triggerD:\a\1\s\Xamarin.Forms.Core\Page.cs:301
  • Page.OnChildMeasureInvalidated (System.Object sender, System.EventArgs eD:\a\1\s\Xamarin.Forms.Core\Page.cs:227
  • VisualElement.InvalidateMeasureInternal (Xamarin.Forms.Internals.InvalidationTrigger triggerD:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:833

  • 5 Replies

    PK Pradeep Kumar Balakrishnan Syncfusion Team January 16, 2019 04:34 PM UTC

    Hi Emil, 
     
    Thank you for bringing this requirement to our attention. However, in order to work on a solution, we need further information from you.  
     
    1. Are you having only one column and that column is also hidden.
    2. If possible can you share issue reproducing sample, Xamarin Forms version and Android API version.
    3. How many rows and columns are populated for DataGrid.
     
    If you are concerned about sharing sensitive, confidential or proprietary information, please report the issue through Direct Trac, our technical support incident reporting and management portal. 
     
    Please let us know if you need any further clarifications about what we require from you. 
     
    Regards, 
    Pradeep Kumar B 



    EM Emil January 17, 2019 12:09 AM UTC

    my sfdatagrid looks like as below. this code is crashing with the stracktrace above. If i add,  HeightRequest="100"  , it doesnt crash. this wasnt required in the previous versions. It seems like that you changed something. 

    i could reproduce this crash on Android and UWP

      <sfgrid:SfDataGrid ScrollingMode="PixelLine" HorizontalOptions="FillAndExpand"
                             x:Name="dataGrid"                        
                             AutoGenerateColumns="False"
                             AllowSorting="True"                      
                             ColumnSizer="Auto"                           
                             RowHeight="30"                        
                             AllowSwiping="False"  
                             SelectedItem="{Binding SelectedReportModel}" 
                             SelectionMode="Single"   ItemsSource="{Binding  ReportModels}">
                            <sfgrid:SfDataGrid.Columns x:TypeArguments="syncfusion:Columns">
                                <sfgrid:GridTextColumn IsHidden="True" HeaderText="Id"
                                    MappingName="Id" />
                                <sfgrid:GridTextColumn HeaderText="{resx:Translate Name}"
                                    MappingName="Name" />
                                <sfgrid:GridTextColumn HeaderText="{resx:Translate  Details}"
                                     MappingName="TotalReps" />
                                <sfgrid:GridTextColumn HeaderText="{resx:Translate Comments}"
                                   MappingName="TotalSets" />
                              
                            </sfgrid:SfDataGrid.Columns>

                        </sfgrid:SfDataGrid>


    PK Pradeep Kumar Balakrishnan Syncfusion Team January 20, 2019 09:04 PM UTC

    Hi Emil. 
      
    Thanks for your update, 
     
    We have checked your query with “SfDataGrid is crashed while loading” and it was working fine from our side. We have checked the SfDataGrid (16.4.0.44) with Xamarin 2.5 version and we have attached a sample which we have tested and prepared based on the details you provided. 
     
      
    In case if you still experience the issue from your side, please modify the attached sample to reproduce the issue from your side with device details, which will be helpful for us to validate the issue and provide you solution at earlier.  
      
    Regards, 
    Pradeep Kumar B 



    EM Emil January 20, 2019 11:37 PM UTC

    Hi,

    please try to always use latest version at least. you could simply see the error if you update to latest version of xamarin. here i have attached it for you.

    thanks,

    Emil

    Attachment: SfDataGridSample_6864bdc3.zip


    PK Pradeep Kumar Balakrishnan Syncfusion Team January 21, 2019 06:51 PM UTC

    Hi Emil, 
     
    Thanks for your update, 
     
    We have checked the reported issue “SfDataGrid is crashed while loading” on Samsung S6 and S8 device, But we cannot able to replicate issue from our side, We have attached the video for your reference taken while testing the shared sample, And you can download the same from below link.  
     
     
    Can you please provide the following details which will be helpful to provide the better solution. 
    1) Issue has replicated on Device or Emulator 
    2)Emulator version 
    3)Android SDK version and Device details: 
     
    Regards, 
    Pradeep Kumar B 


    Loader.
    Live Chat Icon For mobile
    Up arrow icon