当在下一个表单文本框上单击按钮时,获取datagridview所选行的值 [英] get values of a datagridview selected row when button click on next form textbox

查看:58
本文介绍了当在下一个表单文本框上单击按钮时,获取datagridview所选行的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个表单,第一个表单有文本框,第二个表单有datagridview和Button.在Datagridview中有3个列,第一个复选框列是我在其中选择行,第二个名称和第三个电子邮件.
在按钮上单击,我只希望在第一种形式的文本框中显示所选的电子邮件值.
请帮助我....
预先thnx

i have two form in first form have textbox and in second form have datagridview and Button.in Datagridview have 3 coloumns,first checkbox column in which i select the rows, 2nd Name and 3rd email.
On button click i want show only selected Email value in textbox of first form.
plz help me....
thnx in advance

推荐答案

假定您已经在按钮单击事件处理程序中检索到Email值,则可以使用单独的类设置值来存储此值.然后,以您的第一种形式引用该类,并使用该类的get属性检索值,并将其显示在文本框中.
Assuming you have already retrieved the Email value in the button click event handler, your can store this value using a separate classes set value. Then, reference this class in your first form and retrieve the value using the get property of the class and show it in the text box.


这篇关于当在下一个表单文本框上单击按钮时,获取datagridview所选行的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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