datagrid 关于 右键指向该行记录
datagrid 里数据已经显示了我的程序是添加一个右键菜单 里面有一向删除
选中该行 然后查找对应的编号 删除
但是发现右键不能选中该行
只有左键点一下 才有选中该行的功能
请问如何才能让右键有左键的功能呢
只要让右键选中该行就行,就是那个指针指向这一行就行
谢谢大家啊
改用ListView吧 暂时只需要DATAGrid 引用什么引用
我出钱好了 你给我做这个
开个玩笑,不要生气 那好吧 我不生气了
最近看新水浒
想生气就生气
说不生气 嗨 真的不生气了
用鼠标位置或也许可以,但是太麻烦了 简单做了一个,很多情况没有考虑
Private Sub DataGrid1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim i As Integer
Dim sumHeight As Single
If Button = 2 Then
With DataGrid1
For i = 0 To Adodc1.Recordset.RecordCount - 1
.Row = i
sumHeight = sumHeight + .RowHeight
If sumHeight + .RowHeight > Y Then
Exit For
End If
Next i
End With
End If
End Sub
补充:VB , 数据库(包含打印,安装,报表)