我有人數據其是名字,姓氏,編碼和人的照片的表。當我從表中選擇的人喜歡和結果發送到DevExpress的GridControl它顯示名字,姓氏和代碼列。但Photo列在所有行中顯示System.Byte []值。問題是什麼。的DevExpress GridControl圖像列中顯示喜歡的圖像System.Byte []
3
A
回答
6
你應該列的ColumnEdit財產與RepositoryItemPictureEdit的實例分配。在這種情況下,XtraGrid中就能顯示在網格中的圖像。
樣品:How to display an image in GridControl
相關鏈接:
0
***字節轉換爲圖像
data.Read();
//get the value of the size field in the current row and store it in filesize
int fileSize = data.GetInt32(data.GetOrdinal("size"));
//get the value of the name field in the current row and store it in filesize
string name = data.GetString(data.GetOrdinal("name"));
//Create a byte array to read the file in the row which is in bytes
byte[] rawData = new byte[fileSize];
//Read the bytes and store it in the array
data.GetBytes(data.GetOrdinal("file"), 0, rawData, 0, fileSize);
//Create the file from the byte array which is read from the database
FileStream fs = new FileStream(name, FileMode.Create, FileAccess.Write);
fs.Write(rawData, 0, fileSize);
//closing the file stream
fs.Close();
//Showing the image that is just retreived in te picturebox picDB
picDB.BackgroundImage = new Bitmap(name);
相關問題
- 1. GridControl中的圖像-Devexpress
- 2. TileView圖像列不顯示圖像(Devexpress)
- 3. 伯爵喜歡的圖像
- 4. System.Byte []顯示在gridview而不是圖像?
- 5. DevExpress GridControl主視圖不顯示信息
- 6. Facebook的喜歡按鈕 - 圖像上的新聞源未顯示
- 7. 喜歡我在Facebook上的頁面顯示錯誤的圖像
- 8. Facebook的喜歡按鈕顯示0像
- 9. 控制圖像,Facebook的顯示,當我喜歡一個URL
- 10. Databinding datagrid通過數據集數據源:圖像列不顯示圖像,但system.byte []
- 11. Facebook的「喜歡」圖像按鈕
- 12. DevExpress MVC GridView內顯示圖像
- 13. DevExpress XtraGrid LayoutView - 如何顯示圖像
- 14. 如何將應用中的圖像與相冊圖像鏈接起來,以便應用中的喜歡圖片會喜歡相冊中的圖像?
- 15. Devexpress(WPF GridControl)使用DataTrigger在GridColumn中修改圖像
- 16. Instafeed.js - Sortby最喜歡60個圖像時
- 17. OG:圖像不喜歡或分享
- 18. 打開燈箱喜歡圖像庫
- 19. 陣列圖像的顯示
- 20. 如何顯示在DevExpress的列表框圖像
- 21. Magento - 右鍵縮略圖圖像不會顯示鏈接/喜歡Facebook
- 22. 在Facebook上顯示喜歡的喜歡數量喜歡按鈕
- 23. 喜歡/不喜歡系統像FB
- 24. 如何觸發Facebook從圖像映像中獲得喜歡?
- 25. onclick從圖像列表中的圖像顯示在主div中點擊圖像
- 26. Facebook的開放圖 - '喜歡按鈕' - 隱藏的內容顯示'喜歡'
- 27. 如何顯示用戶在Instagram上喜歡的所有圖像(通過API)?
- 28. 解析:不能從後發現喜歡標識,以使喜歡的圖像
- 29. 在列表視圖中顯示圖像
- 30. MVC 3 - System.byte []輸出而不是顯示圖像
的d這裏的直連例如如何做到這一點[http://www.devexpress.com/Support/Center/Example/Details/E3819](http://www.devexpress.com/Support/Center/Example/Details/E3819 ) – wasyl