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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Display SQL Image data type in template

Thread ID:





150209 Dec 26,2019 01:19 PM UTC Jan 2,2020 01:35 PM UTC Blazor 3
Tags: TreeView
Scott Peal
Asked On December 26, 2019 01:19 PM UTC

How can we display a thumbnail of an image stored in an MS SQL database as a data type image? The template display docs shows how to template a static image but not a dynamic one. Thanks.

Responsive Edge
Replied On December 29, 2019 07:14 PM UTC

FYI, the image data type has been deprecated and will no longer be supported in future SQL Server versions, so I wouldn't use it for any new development: https://docs.microsoft.com/en-us/sql/t-sql/data-types/ntext-text-and-image-transact-sql?redirectedfrom=MSDN&view=sql-server-ver15

Scott Peal
Replied On January 1, 2020 12:24 AM UTC

Thanks for the info. We are using bytes. 

Shameer Ali Baig Sulaiman Ali Baig [Syncfusion]
Replied On January 2, 2020 01:35 PM UTC

Hi Scott, 
Greeting from Syncfusion support. 
We have analyzed your reported query on referring image in EJ2 TreeView which is stored in an MS SQL database as a data type image.  
For your information, In EJ2 TreeView component, we have to refer the image URL directly or need to set the base64 as src tag for referring an image in a node.  
Currently, EJ2 TreeView will not support any other formats for referring image. In your case, you can convert the bytesArray into base64 using valid online convertor. After that, you can refer the base64 value in src tag of image. 
To know about the image for TreeView. Refer the below links. 
Please, let us know If you face any issue while using base64 and image in TreeView component, we are happy to assistance on this regard. 
Shameer Ali Baig S. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon