查看: 843|回复: 2
|
请问datagrid's events handler
[复制链接]
|
|
以下是如果我在datagrid click了一下mouse的event handler
Private Sub DataGrid_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DataGrid.MouseUp
请问如果在datagrid press ENTER's 就会有反应的event handler该如何写呢?
[ 本帖最后由 counterking 于 17-4-2006 06:54 PM 编辑 ] |
|
|
|
|
|
|
|
发表于 18-4-2006 09:28 AM
|
显示全部楼层
原帖由 counterking 于 17-4-2006 06:52 PM 发表
以下是如果我在datagrid click了一下mouse的event handler
Private Sub DataGrid_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)[/color ...
你可以用 key press:
Private Sub DataGrid1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles DataGrid1.KeyPress
If (Convert.ToInt32(e.KeyChar) = 13) Then
' your code
End If
End Sub |
|
|
|
|
|
|
|
楼主 |
发表于 18-4-2006 11:55 PM
|
显示全部楼层
谢谢你的帮助!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
|
|
|
|
|
|
| |
本周最热论坛帖子
|