Display HTML URLs links and images in a DataGrid column

Hello,

I'm trying to accomplish 2 things, 1) Make a data column value clickable to a URL and 2) display an image in a column based on a URL.

So for #1, I have 2 columns one called VideoTitle and one with a value representing a YouTube video ID.  I'd like to make VideoTitle clickable and have it take you to "https://www.youtube.com/watch?v=" + VideoID

and for #2, I have a column for VideoImg which contains the link for a JPG. I'd like to display that in a column.  Such as https://exampl.com/vi/ZhrimJg3HzE/hqdefault.jpg

Thanks!

Michael


1 Reply

PS Prathap Senthil Syncfusion Team November 15, 2023 08:59 AM UTC

Hi Michael,


As per your needs, we suggest using the grid column's column template feature, which allows you to customize your needs. Please refer to the UG documentation mentioned below for your reference.

Documentation: https://blazor.syncfusion.com/documentation/datagrid/column-template



Regards,

Prathap S


Loader.
Up arrow icon