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

Image on column header

It´s possible add an image on header column in sfdatagrid in Xamarin forms?

Look the attachment for details

3 Replies

BS Balasubramani Sundaram Syncfusion Team August 23, 2019 07:37 AM

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.Columns x:TypeArguments="syncfusion:Columns"> 
        <dataGrid:GridTextColumn  MappingName="OrderID"  Padding="0,0,0,0"> 
                        <Image x:Name="headerImage" Source="Right.jpg"  HeightRequest="100" WidthRequest="50"/> 
        <dataGrid:GridTextColumn  MappingName="EmployeeID"/> 
        <dataGrid:GridTextColumn   MappingName="CustomerID"/> 
We hope this helps. Please let us know, if need any further assistance. 
Balasubramani Sundaram.

RF RAFAEL FELIPE SACOMANI August 23, 2019 09:00 AM

Thanks!! Solve my problem! <3

FP Farjana Parveen Ayubb Syncfusion Team August 26, 2019 12:36 AM

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. 
Farjana Parveen A  

Live Chat Icon For mobile
Up arrow icon