1
object opic=dataView[i]["样图"];
2
Byte[] bytePicture =(Byte[])opic;
3
MemoryStream ms = new MemoryStream bytePicture);
4
Bitmap bit = new Bitmap(ms);
5
Image smallbit;
6
Image smallbit=bit.GetThumbnailImage(100,100,null,IntPtr.Zero);//dataView[i]["样图"] 对应于sqlserver数据库中的一个Image字段内容
7
8
9
//设置C1flexgrid单元格尺寸
10
CellRange cr = c1Grid.GetCellRange(i+1,j+1,i+1,j+1);
11
cr.Image=smallbit;
12
c1Grid.Rows[i+1].Height = smallbit.Height;
13
c1Grid.Cols[j+1].Width = smallbit.Width;
14

2

3

4

5

6

7

8

9

10

11

12

13

14
