SfDataGrid with clickable image to open URL

Dear Support team,


I am using WPF sfdatagrid in a project. I have defined a GridHyperlinkColumn , but rather than showing the URL text, I would like to show a small link image that the user can click to open the url. This will save space in the table for more important details. Each hyperlink will show the same image, so I could probably create a resource for that (e.g. External Link_01 in Metro Studio).

How would I best approach this? Via an Image Column, Template Column or can I adjust the GridHyperlinkColumn in xaml?

Would it be possible to show the URL as a tooltip when hovering the cursor over the link image?

Any help would be appreciated.

Kind regards,

Niels



                            <sf:GridHyperlinkColumn MappingName="FK_URL"

                                               HeaderText="FK"

                                               DisplayBinding="{Binding FK_URL}"

                                               AllowFiltering="True"

                                               AllowEditing="False"/>




Attachment: datatable_example_25bc2dab.7z

1 Reply

SS Sampathnarayanan Sankaralingam Syncfusion Team March 7, 2022 03:32 PM UTC

Hi NM van Strien, 

Please find the below response. 

How would I best approach this? Via an Image Column, Template Column or can I adjust the GridHyperlinkColumn in xaml? 
We can understand the requirement to load the image instead of HyperLink. You can use GridImageColumn or GridTemplateColumn to achieve the requirement instead of GridHyperLinkColumn since you cannot load the image in the GridHyperLinkColumn. 
Would it be possible to show the URL as a tooltip when hovering the cursor over the link image? 
You can achieve the requirement to show the URL(Underlying value) as tooltip by enabling GridColumn.ShowToolTip property. Please refer the below UG for more details. 

  

Please let us know if you have any concerns. 

Regards, 
Sampath Narayanan.S 


Loader.
Up arrow icon