HeaderContentTemplate Image issue

4 posts, 0 answers
  1. Manuel
    Manuel avatar
    3 posts
    Member since:
    Jan 2017

    Posted 07 Mar 2018 Link to this post

    Hi!, im trying to use an image instead of text using HeaderContentTempleate.

     

    Is working until datagrid scroll from left to right, then datagrid display images randomly in other column header.

     

    This is my DataGrid code, i couldnt find any documentation or sample code. Im using 2017.3 Xamarin Forms, inside a PCL project. The issue occurs in Android, dont know if its working well in iOs or not.

     

      <telerikGrid:RadDataGrid x:Name="DataGrid" AutoGenerateColumns="False" Margin="5" Grid.Row="1">
                    <telerikGrid:RadDataGrid.Columns>
                        <telerikGrid:DataGridNumericalColumn PropertyName="PosicionGeneral">
                            <telerikGrid:DataGridNumericalColumn.HeaderContentTemplate>
                                <DataTemplate>
                                    <Image HorizontalOptions="Center" Source="pos.png" WidthRequest="50" BackgroundColor="Transparent" VerticalOptions="Center" />
                                </DataTemplate>
                            </telerikGrid:DataGridNumericalColumn.HeaderContentTemplate>
                        </telerikGrid:DataGridNumericalColumn>
                        <telerikGrid:DataGridNumericalColumn PropertyName="PosicionCategoria">
                            <telerikGrid:DataGridNumericalColumn.HeaderContentTemplate>
                                <DataTemplate>
                                    <Image HorizontalOptions="Center" Source="poscat.png" WidthRequest="50" BackgroundColor="Transparent" VerticalOptions="Center" Margin="10,0,10,0"/>
                                </DataTemplate>
                            </telerikGrid:DataGridNumericalColumn.HeaderContentTemplate>
                        </telerikGrid:DataGridNumericalColumn>
                        <telerikGrid:DataGridNumericalColumn PropertyName="Dorsal" >
                            <telerikGrid:DataGridNumericalColumn.HeaderContentTemplate>
                                <DataTemplate>
                                    <Image HorizontalOptions="Center" Source="dorsal.png" WidthRequest="50" BackgroundColor="Transparent" VerticalOptions="Center" Margin="10,0,10,0"/>
                                </DataTemplate>
                            </telerikGrid:DataGridNumericalColumn.HeaderContentTemplate>
                        </telerikGrid:DataGridNumericalColumn>
                        <telerikGrid:DataGridTextColumn PropertyName="Nombre" HeaderText="Nombre"/>
                        <telerikGrid:DataGridTextColumn PropertyName="Apellidos" HeaderText="Apellidos"/>
                        <telerikGrid:DataGridTextColumn PropertyName="Tiempo" >
                            <telerikGrid:DataGridTextColumn.HeaderContentTemplate>
                                <DataTemplate>
                                    <Image HorizontalOptions="Center" Source="crono.png" HeightRequest="35" BackgroundColor="Transparent" VerticalOptions="Center"/>
                                </DataTemplate>
                            </telerikGrid:DataGridTextColumn.HeaderContentTemplate>
                        </telerikGrid:DataGridTextColumn>
                        <telerikGrid:DataGridTextColumn PropertyName="Sexo" HeaderText="Sexo"/>
                    </telerikGrid:RadDataGrid.Columns>
                </telerikGrid:RadDataGrid>

  2. Yana
    Admin
    Yana avatar
    5025 posts

    Posted 12 Mar 2018 Link to this post

    Hello Manuel,

    I managed to reproduce a similar behavior when using images in HeaderContentTemplate of the DataGrid with R3 2017 release, however, the same setup seems to work properly with our latest R1 2018 SP release of Telerik UI for Xamarin.
    So, is it possible to upgrade and test the solution you have with the latest release?  Please let me know the result.

    Looking forward to your reply.

    Regards,
    Yana
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Manuel
    Manuel avatar
    3 posts
    Member since:
    Jan 2017

    Posted 12 Mar 2018 in reply to Yana Link to this post

    Hi Yana.

     

    I updated my project references to 2018 R1. Now debugging inside visual studio emulator for Android seems to work propertly but when i install the apk inside my phone (Android 7) keeps buggy.

  4. Yana
    Admin
    Yana avatar
    5025 posts

    Posted 15 Mar 2018 Link to this post

    Hello Manuel,

    I have just tested the case on two devices with Android 7 and Android 8 and the images are loaded and displayed properly.  Could you please make sure that you've rebuilt the solution with the R1 assemblies and that you've deployed the updated version on the device?

    Let me know whether the issue is still reproducible.

    Regards,
    Yana
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top