如何在文本框中显示datagridview值. [英] How to show datagridview value in textbox.

查看:124
本文介绍了如何在文本框中显示datagridview值.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个Forms,一个Form1包含一个文本框,另一个Form2包含datagridview.现在,我希望每当我单击Form1文本框时都应打开Form2 datagridview,并且当我单击Form2 datagridview单元时,该垂直单元格的值应出现在Form1文本框中.

因此,请告诉我我该怎么做.

I have two Forms,Form1 which contains one textbox and Form2 which contains datagridview.Now i want that whenever i click on Form1 textbox the Form2 datagridview should open and when i click on Form2 datagridview cell,the value of that perticular cell should appear in Form1 textbox.

So,pleas tell me how could i do that.

推荐答案

Hi Gopal,
        Use the GET SET properties for sending values from Form2 to Form1. On Click event of cell set the property value to Cell Text and retrieve the value after form2 closed.


这篇关于如何在文本框中显示datagridview值.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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