- Home
- Forum
- Xamarin.Forms
- Image on column header
Image on column header
It´s possible add an image on header column in sfdatagrid in Xamarin forms?
Look the attachment for details
SIGN IN To post a reply.
3 Replies
BS
Balasubramani Sundaram
Syncfusion Team
August 23, 2019 12:37 PM UTC
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> |
Sample Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/SupportXForms763293055
We hope this helps. Please let us know, if need any further assistance.
Regards,
Balasubramani Sundaram.
Balasubramani Sundaram.
RF
RAFAEL FELIPE SACOMANI
August 23, 2019 02:00 PM UTC
Thanks!! Solve my problem! <3
FP
Farjana Parveen Ayubb
Syncfusion Team
August 26, 2019 05:36 AM UTC
Hi Rafael,
Thanks for the update.
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you.
Regards,
Farjana Parveen A
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
RF RAFAEL FELIPE SACOMANI
- Aug 22, 2019 12:32 PM UTC
- Aug 26, 2019 05:36 AM UTC