Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的项目中,我使用的是无界 Datagridview,其中包含指定的列,如 ID、项目名称、项目代码、尺寸、颜色、费率、数量、总计。在这里,我让我的最终用户只输入项目名称/项目代码和数量。剩余的列将自动完成。现在我的问题是当最终用户输入项目名称/项目代码时,焦点应该设置为数量,当输入数量时,焦点应该在项目名称/项目代码的新行中。
是否可以 。任何人都可以给我一个权利来完成这项任务......
如果您使用的是 c# 和 DataGridView,则可以使用以下示例设置焦点:
DataGridView1.CurrentCell = DataGridView1[columnnumber,rownumber]; To put it in edit mode: DataGridView1.BeginEdit(true);
希望这可以帮助。