keypressEdit事件代码
If e.Col.Name = "订单号" Then '如果编辑的是客户ID列
If e.Col.DroppedDown = False '且下拉窗口没有打开
e.Col.OpenDropDown() '打开下拉窗口
End If
End If
If e.Col.Name = "姓名" Then '如果编辑的是客户ID列
If e.Col.DroppedDown = False '且下拉窗口没有打开
e.Col.OpenDropDown() '打开下拉窗口
End If
End If
keydownEdit事件
If e.Col.Name = "订单号" Then '如果编辑的是客户 ID列
If e.Col.DroppedDown Then '如果下拉窗口已经打开
Dim tbl As Table = Tables("窗口5_Table1")
If e.KeyCode = Keys.Up Then '如果按下的是上箭头按键
tbl.Position = tbl.Position - 1 '向上移动一行
e.Cancel = True
ElseIf e.KeyCode = Keys.Down Then '如果按下的是下箭头按键
tbl.Position = tbl.Position + 1 '向下移动一行
e.Cancel = True
End If
End If
End If
If e.Col.Name = "姓名" Then '如果编辑的是客户 ID列
If e.Col.DroppedDown Then '如果下拉窗口已经打开
Dim tbl As Table = Tables("窗口1_Table1")
If e.KeyCode = Keys.Up Then '如果按下的是上箭头按键
tbl.Position = tbl.Position - 1 '向上移动一行
e.Cancel = True
ElseIf e.KeyCode = Keys.Down Then '如果按下的是下箭头按键
tbl.Position = tbl.Position + 1 '向下移动一行
e.Cancel = True
End If
End If
End If