This is a migrated thread and some comments may be shown as answers.

HeaderContentTemplate Image issue

3 Answers 89 Views
DataGrid
This is a migrated thread and some comments may be shown as answers.
Manuel
Top achievements
Rank 1
Manuel asked on 07 Mar 2018, 03:20 PM

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>

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 12 Mar 2018, 09:18 AM
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
0
Manuel
Top achievements
Rank 1
answered on 12 Mar 2018, 11:50 AM

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.

0
Yana
Telerik team
answered on 15 Mar 2018, 08:55 AM
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
Tags
DataGrid
Asked by
Manuel
Top achievements
Rank 1
Answers by
Yana
Telerik team
Manuel
Top achievements
Rank 1
Share this question
or