请问dxgrid里面怎么才能显示图片
我想实现的是在dxgrid里面第一条商品记录中显示这个商品的图片(jpg)的,请问要怎么设置.
[解决办法]
在DBGrid的OnDrawCell事件中加入如下代码即可在DBGrid控件中显示图
形。
var
Bmp: TBitmap;
begin
if (Column.Field.DataTyp = ftBLOB) or (Column.Field.DataTyp =
ftGraphic) then
begin
Bmp:=TBitmap.Create;
try
Bmp.Assign(Column.Field);
DBGrid1.Canvas.StretchDraw(Rect,Bmp);
Bmp.Free;
Except
Bmp.Free;
end;
end;
end;
[解决办法]
点击customize在columns中选择你所要显示图片的字段
设置properties属性为Image
其子属性Stretch属性为true;
试试~~~~
[解决办法]
点击customize在columns中选择你所要显示图片的字段
设置properties属性为Image
其子属性Stretch属性为true;