如何将GridView Selected行值从一个表单传递到另一个表单 [英] How to pass GridView Selected row values from one form to another form
本文介绍了如何将GridView Selected行值从一个表单传递到另一个表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hai我有一个Windows应用程序。现在我有两种形式。
Form1 包含 GridView ,其中包含10条记录。
例如:
id姓名
1 Venkat
2 Srikanth < br $> b $ b
Form2 包含一个组合框。
当我点击 gridview行时,行数据应显示在 form2 的组合框中。
Hai I have a windows application. Now I have two forms.
Form1 contains GridView that contains 10 records.
Eg:
id Name
1 Venkat
2 Srikanth
Form2 contains one combobox.
when I click on gridview row that row data should display in Combo box in form2.
推荐答案
在Form1中你必须构建一个ObjectReference到Form2 - 然后你就可以用这种方式从Form2访问Combobox ......
In Form1 you have to build an ObjectReference to Form2 - then you are able to access the Combobox from Form2 with this way ...
你好,
阅读本文:
1)如何在C#.NET windows应用程序中将值从一个表单传递给另一个表单?
2)如何转换在窗口应用程序的c#中将数据从一种形式转换为另一种形式。
这篇关于如何将GridView Selected行值从一个表单传递到另一个表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文