简体   繁体   中英

How to convert byte array to image and display in datagrid?

I have made a sql database using sql server. This database include images. When I display this database in a datagrid, byte[]array displays in the image column. How do I convert from a byte array back to an image and then display that image in the datagrid? Any help or tutorials are appreciated. thanks

Try

 MemoryStream ms = new MemoryStream(imageBytes);
 Image image= Image.FromStream(ms);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM