Dim tbs() As String = {"XMFP","XMZB.XMFP"}
For Each s As String In tbs
Dim t As Table = Tables(s)
For Each tr As Row In t.Rows
Dim xl As Integer= tr.Index + 1
Dim yl As Integer= t.Cols("缩略图").Index + 1
Dim cs1 As C1.Win.C1FlexGrid.CellStyle = t.grid.Styles.Add(tr("_Identify"))
If tr("缩略图") > "" Then
If FileSys.FileExists("\\SERVER\Foxtemp$\" & tr("缩略图")) Then
cs1.BackgroundImage = getimage( "\\SERVER\Foxtemp$\" & tr("缩略图"))
cs1.Display = C1.Win.C1FlexGrid.DisplayEnum.ImageOnly
cs1.BackgroundImageLayout = C1.Win.C1FlexGrid.ImageAlignEnum.Stretch
Else
' MessageBox.Show("1")
cs1.BackgroundImage = getimage("Images\failed.ico")
cs1.Display = C1.Win.C1FlexGrid.DisplayEnum.ImageOnly
cs1.BackgroundImageLayout = C1.Win.C1FlexGrid.ImageAlignEnum.Stretch
End If
Else
cs1.BackgroundImage = Nothing
End If
t.grid.SetCellStyle(xl,yl, CS1)
Next
Next
如果还有问题,上传具体实例,以及图片测试。