Hi Rafael,
Thank you for contacting Syncfusion support.
We could able to achieve you requirement of add an image in header column through “HeaderTemplate” support in “SfDataGrid” on each data column. However, we don’t have auto fit support for the data template, so you must set the “HeaderHeightRequest” based on the image height you define in application.
Please refer the following sample and code snippet,
Code Snippet [MainPage.xaml]
<dataGrid:SfDataGrid
......
HeaderRowHeight="100"
>
<dataGrid:SfDataGrid.Columns x:TypeArguments="syncfusion:Columns">
<dataGrid:GridTextColumn MappingName="OrderID" Padding="0,0,0,0">
<dataGrid:GridTextColumn.HeaderTemplate>
<DataTemplate>
<StackLayout>
<Image x:Name="headerImage" Source="Right.jpg" HeightRequest="100" WidthRequest="50"/>
</StackLayout>
</DataTemplate>
</dataGrid:GridTextColumn.HeaderTemplate>
</dataGrid:GridTextColumn>
<dataGrid:GridTextColumn MappingName="EmployeeID"/>
<dataGrid:GridTextColumn MappingName="CustomerID"/>
</dataGrid:SfDataGrid.Columns>
</dataGrid:SfDataGrid> |
We hope this helps. Please let us know, if need any further assistance.
Regards,
Balasubramani Sundaram.