- Dim tbl As SmGrid=sender
- If tbl.Col<tbl.Rows.Fixed Then
- Return
- End If
- Dim strColName=tbl.Cols(tbl.Col).Name
- If strColName="Photo" AndAlso Proj.OpenedForms.Contains("图片显示模板")=False Then '如果没有打开窗体
- Dim frm As SmForm=Proj.Forms("图片显示模板")
- frm.Owner=tbl.Form
- frm.Show()
- End If
-
- '如果是指定字段,则要检查一下是否要重新绑定字段
- If strColName="Photo" Then
- Dim pic As SmPictureBox=Proj.OpenedForms("图片显示模板").ControlDictionary()("图片控件")
- '需要绑定的字段
- Dim strBinding As String=tbl.Form.Name & "." & tbl.Name & "." & strColName
- If strBinding<>pic.BindingColString Then
- pic.BindingColString=strBinding
- End If
- End If
复制代码
|