TileView 图像列不显示图像 (Devexpress)

TileView Image Column Not Show image (Devexpress)

我的表单上有 gridControl 转换为 Tileview 布局,我想将我的数据从数据库显示到 tileview,我的问题是我的图像不显示,只显示它 bytes.how 我可以解决这个问题吗?我使用 repository.Edit.Picturebox 但问题存在。

参考这个- Grid Control - (converted to TileView) - How to show an image column

Columns are automatically created when you assign a data source to a grid. Populate tile items based on these columns manually by using the Grid Designer. Your image will be shown properly if your column type is Image or Byte[].

我使用的方法是在我的数据源中创建一个单独的列,其中包含字节数组,如下面的代码片段所示:

templateRow[TableColumnName.ImagePath] = finalPath;
templateRow[TableColumnName.Image] = DevExpress.XtraEditors.Controls.ByteImageConverter.ToByteArray(
                                    System.Drawing.Image.FromFile(finalPath), System.Drawing.Imaging.ImageFormat.Png);

有几种不同的方法可以在单元格中显示图标。请查看 How to put an image in a grid cell 文章,其中演示了与此任务相关的几种可能方法。

参考文献:
Tile View not loading image from column containing Image Path
byte array column to image display