使用文本框可编辑的DataGridView [英] DataGridView editable with textboxes

查看:88
本文介绍了使用文本框可编辑的DataGridView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些用于datagridview的示例,该示例可以使用vb.net来键控数据.并且每当用户按Enter时,它将把焦点移到另一列.

示例如下:
名称年龄身高腰围体重
A
B
C
D
E
F
G
H

J
K
L
M

列名不可编辑.文本框将显示年龄",身高",腰围"和体重"列.我希望仅在datagridview中将其限制为13行.当用户输入年龄A并按Enter键时,它将焦点移到A的高度.到达数据中的重量和用户键列并按Enter时,它将焦点移到下一行B''智者.

谁可以帮我这个事.
这个怎么做.有人可以帮我吗?

I need some sample for the datagridview that enable to key data using vb.net. And whenever the user press enter, then it will move the focus to another column.

The example is as below:
Name Age Height Waist Weight
A
B
C
D
E
F
G
H
I
J
K
L
M

The column name is not editable. And there will be the textboxes for column Age, Height, Waist and Weight. And I want it to be limited to 13 rows in the datagridview only. And when user key in age for A and press enter, it will move the focus to Height of A. When it reach the column Weight and user key in the data and press enter, it will move the focus to next row, B''s Age.

Can anyone help me on this.
How to do this. Can anyone help me on this?

推荐答案

当您将焦点放在您的Datagridview上时,像您这样的声音将需要引发一个按键事件.然后读取当前位置并将其进一步移动一列.然后在此处检查以限制行.
Sounds like you''ll need to raise a keypress event when the focus is on your Datagridview. Then read the current position and move it one column further. Then check here for limiting the rows.


这篇关于使用文本框可编辑的DataGridView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆