且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Datagridview C#中获取一行数据

更新时间:2023-12-06 17:06:40

你可以使用几个事件 - 也许是myDGV.CellClick。例如,此事件通过它的EventArgs为您提供已单击的行和列。

现在您可以创建自定义的对话框,您可以在其中提供所选行的条目,您可以在其中输入修改它们。



尝试对此进行编码,我们可以进一步说明......
There are severall Events you can use - perhaps the myDGV.CellClick. For example this Event gives you by it's EventArgs the Row and Column, which you have clicked.
Now you could create your customized Dialog, to which you give the entries of the selected row and inside which you could modify them.

Try to code this and we can speak further ...