以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  双击错误 DataRow”不是“RowColEventArgs”的成员  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=113756)

--  作者:yifan3429
--  发布时间:2018/1/22 16:07:00
--  双击错误 DataRow”不是“RowColEventArgs”的成员

DoubleClick

双击单元格后执行。

---------------------------
错误
---------------------------
编译错误:“DataRow”不是“RowColEventArgs”的成员。



错误代码:Dim dr As DataRow = e.DataRow
---------------------------
确定   
---------------------------

Dim dr As DataRow = e.DataRow
If dr.IsNull ("楼层") Or Dr.IsNull("房间")  Or Dr.IsNull("产品名")  Then
    MessageBox.show("产品名 必填","提示")
    e.cancel = True
Else 

If e.Col.name = "图片" Then
    baseMainForm.WindowState= Windows.forms.FormWindowState.Minimized
    ClipBoard.Clear
    Dim proc As new Process
    proc.File = ApplicationPath & "/capture.exe"
    proc.WaitForClose = True
    proc.Start
    If ClipBoard.GetImage IsNot Nothing Then
        Dim f As String =  e.Row("用户ID") & "\\" & "3.报价配图" & e.Row("楼层")& "\\"    & "\\" & Format( Date.Today,"yyyy-MM-dd") & "\\"& e.Row("产品名") &"-" & e.Row("产品号")&".png"
        Dim path As String = e.Col.DataCol.DefaultFolder
        If path = "" Then
            \' "项目文件" & "\\" &  ProjectPath &
            path = Vars("IPM")
            \'path = ProjectPath & "CYGJ2016/"
        End If
        basemainform.WindowState = 2
        Dim dir As String = FileSys.GetParentPath(path & "/" & f)
        If FileSys.DirectoryExists(dir) = False Then FileSys.CreateDirectory(dir)
        ClipBoard.GetImage.save(path & "/" & f)
        e.Row(e.Col.name) = f
    End If
    e.cancel = True
    Tables("报价清单").Current.Save() \'保存文件的行
    End If
End If

--  作者:wyz20130512
--  发布时间:2018/1/22 16:30:00
--  
DoubleClick事件中没有 e.DataRow只有e.Row
--  作者:有点甜
--  发布时间:2018/1/22 18:01:00
--  

Dim dr As DataRow = e.DataRow

 

改成

 

Dim dr As DataRow = e.Row.DataRow