vb.net中如何将datagridview选中的值传给另一个窗体中的textbox控件
vb.net中如何将datagridview选中的值传给另一个窗体中的textbox控件图片地址:http://img.my.csdn.net/uploads/201310/26/1382755191_7007.jpg
谢谢! datagridview vb.net --------------------编程问答-------------------- http://www.cnblogs.com/cosoft/archive/2011/08/08/2130659.html --------------------编程问答-------------------- 找到办法了吗? --------------------编程问答-------------------- 方法如下
'Form2窗体的Textbox1属性设置为public
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
DataGridView1.Rows.Add("1行1列", "1行2列")
End Sub
Private Sub DataGridView1_CellContentClick(sender As System.Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
Dim s As String
s = DataGridView1.CurrentCell.Value.ToString()
Dim frm As New Form2
frm.TextBox1.Text = s
frm.ShowDialog()
End Sub
补充:.NET技术 , VB.NET