本文介绍了如何将datagrid值以另一种形式传输到文本框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好.我在Form1中有一个DataGridView,其中有3列分别名为Field1,Field2和Field3.我在Form2中还有3个文本框,分别名为TextBox1,TextBox2和TextBox3.
我的问题是当我单击/选择行时,如何将Field1的选定行值传输到TextBox1,将Field2传输到Textbox2,将Field3传输到Textbox3?我正在网上搜索,但并不令我满意.我不知道这个问题.我应该为这种不同的形式写什么代码?请帮帮我.预先谢谢您.

Hi.. I have a DataGridView in Form1 with 3 columns named Field1, Field2 and Field3. I also have 3 Textboxes in Form2 named TextBox1, TextBox2 and TextBox3.
My question is how to transfer the selected row value of Field1 to TextBox1, Field2 to Textbox2 and Field3 to Textbox3 when I clck/select the row? I''m searching around the web but it doesn''t satisfy me. I have no idea with this problem. What code should I write for this different form? Help me, please. Thank you in advance.

推荐答案


这篇关于如何将datagrid值以另一种形式传输到文本框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-23 11:46