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

Exception on latest version V15.3.0.29 in Android 4.4.2

SfDatagrid throwing exception in Android 4 version. I tested in Samsung S3 physical device and as well as Visual Studio Emulator called "Jelly Bean HDP Phone 4.2" 
Below is my SfDataGrid implementation and Exception stacktrace is as attached. Can you please give me some idea? I cleaned nuget cache and reinstalled latest version and rebuilt the app but it didnt help. thanks,

Emil


     <sfgrid:SfDataGrid  ScrollingMode="Pixel"  x:Name="list"  AllowPullToRefresh="True"
                                            PullToRefreshCommand="{Binding PullToRefreshCommand}"
                                              AbsoluteLayout.LayoutFlags="All"  AbsoluteLayout.LayoutBounds="0,1,1,1"
                          ItemsSource="{Binding Items}"
              SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
             Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="4"
                   AutoGenerateColumns="False"
                   AllowSorting="True"
                      IsEnabled="True"
                   ColumnSizer="Star"
                   AllowSwiping="True"
                   AllowDraggingRow="True"
                  AllowDraggingColumn="False"
                    MaxSwipeOffset="250"
                    GridTapped="dataGrid_GridTapped"
                   SelectionMode="Single"
                   HeaderRowHeight="40"
                  
   QueryRowHeight = "DataGrid_QueryRowHeight"
                                            GridLoaded="DataGrid_GridLoaded" 
       VerticalOptions="FillAndExpand">



Attachment: android4exception_572d8f26.7z

3 Replies

AN Ashok N Syncfusion Team September 22, 2017 11:38 AM UTC

Hi Emil,  
  
Thanks for contacting Syncfusion support.   
 
We have checked the reported issue by preparing a sample using provided code snippet in Jelly Bean HDP emulator but SfDataGrid loaded properly. For your reference we have attached our sample in the location, please check it. Could you please do revert us by modifying our sample to replicate the issue or share your sample along with replication procedure, that would be more helpful for us to proceed further.   
 
 
 
Regards, 
Ashok 



EM Emil September 22, 2017 11:15 PM UTC

Problem was with my datatemplate as I use SfBorderView as shown below. It throws exception in android 4. I changed your sample and changed with reproducible crash. I use also latest XF and Android Support libraries. In your sample were older versions. I updated them as well.


  <syncfusion:SfDataGrid  x:Name="MyDataGrid"

                               ScrollingMode="Pixel"  

                               AllowPullToRefresh="True"

                               PullToRefreshCommand="{Binding PullToRefreshCommand}"

                               AbsoluteLayout.LayoutFlags="All"  

                               AbsoluteLayout.LayoutBounds="0,1,1,1"

                               SelectedItem="{Binding SelectedItem, Mode=TwoWay}"

                               AutoGenerateColumns="False"

                               AllowSorting="True"

                               IsEnabled="True"

                               ColumnSizer="Star"

                               AllowSwiping="True"

                               AllowDraggingRow="True"

                               AllowDraggingColumn="False"

                               MaxSwipeOffset="250"

                               SelectionMode="Single"

                               HeaderRowHeight="40"

                                   GridLoaded="MyDataGrid_GridLoaded"

                               VerticalOptions="FillAndExpand"

                               ItemsSource="{Binding OrdersInfo}">

            <syncfusion:SfDataGrid.Columns 

                x:TypeArguments="syncfusion:Columns">

                <syncfusion:GridTemplateColumn >

                    <syncfusion:GridTemplateColumn.CellTemplate>


                        <DataTemplate>

                            <syncfusion:BorderView BorderColor="Silver" BackgroundColor="White" Margin="10,5" Padding="1" InputTransparent="True">

                                

                            </syncfusion:BorderView>

                        </DataTemplate>


                </syncfusion:GridTemplateColumn.CellTemplate>

                </syncfusion:GridTemplateColumn>


            </syncfusion:SfDataGrid.Columns>

        </syncfusion:SfDataGrid>


Attachment: DataGridExample_3770bc5a.7z


AN Ashok N Syncfusion Team September 25, 2017 05:26 AM UTC

Hi Emil, 
 
Thanks for contacting Syncfusion support.  
 
We have checked your codes and we noticed that, you are using GridTemplateColumn without setting the MappingName. In our SfDataGrid all actions will performed based on the MappingName only. So MappingName is must for GridColumn. You can resolve the issue by setting MappingName to GridColumn.  
 
<syncfusion:SfDataGrid.Columns> 
    <syncfusion:GridTemplateColumn MappingName="OrderID" > 
        <syncfusion:GridTemplateColumn.CellTemplate> 
            <DataTemplate> 
                <syncfusion:BorderView BorderColor="Silver"  
                                       BackgroundColor="White"  
                                       InputTransparent="True"> 
                    <Label Text="{Binding OrderID}"/> 
                </syncfusion:BorderView> 
            </DataTemplate> 
        </syncfusion:GridTemplateColumn.CellTemplate> 
    </syncfusion:GridTemplateColumn> 
</syncfusion:SfDataGrid.Columns> 
 
Regards, 
Ashok

Loader.
Up arrow icon