如何在Datagridview C#中获取一行数据 [英] How Do I Can Get The Data Of A Row In Datagridview C#

查看:63
本文介绍了如何在Datagridview C#中获取一行数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我想做的,我有一个datagridview与一个sql数据库的连接

i需要当用户选择一个单元格并进行2次点击,一个表单将打开并允许他编辑选中的行。



我在c#和linqToSql中工作。



抱歉,如果我的英文写作是不好,即时学习。

this is i want to do ,i have a datagridview with the connection to one sql database
i need when a user select a cell and make 2 clicks, a form will, open and allow he to edit the row selected.

im working in c# and linqToSql.

sorry if my writing english is not good, im learning too.

推荐答案

你可以使用几个事件 - 也许是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 ...


这篇关于如何在Datagridview C#中获取一行数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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