Foxtable(狐表)用户栏目专家坐堂 → 请教对话框的问题,为什么要红冲的时候不弹出对话框?


  共有2804人关注过本帖平板打印复制链接

主题:请教对话框的问题,为什么要红冲的时候不弹出对话框?

帅哥哟,离线,有人找我吗?
yacity
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:二尾狐 帖子:532 积分:4020 威望:0 精华:0 注册:2011/6/18 12:41:00
请教对话框的问题,为什么要红冲的时候不弹出对话框?  发帖心情 Post By:2015/7/20 18:42:00 [只看该作者]

表的 datacolchanging 事件代码如下:

Select Case e.DataCol.Name
       
Case "hongchong"
 If e.DataRow.isnull("hongchong") = False 
 If e.DataRow("hongchong") = False
Dim Result As DialogResult
If Result = DialogResult.no Then
Result = MessageBox.Show("您确定要红冲吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
e.Cancel = True

 End If
Else

Dim Result As DialogResult
Result = MessageBox.Show("您确定要反红冲吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If Result = DialogResult.no Then
    
e.Cancel = True
End If

End If
End If

End Select


实际运行结果: 单击 hongchong 列 要红冲的时候,直接红冲,没有弹出对话框。 取消红冲的时候 弹出对话框,可以正常使用。
 是什么原因照成要红冲的时候 不弹出对话框呢?
代码要怎么写?

 回到顶部