如何在文本框中显示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.