在数据网格内组合框selectedvalue或selectedtext [英] Combo box selectedvalue or selectedtext inside a datagrid

查看:105
本文介绍了在数据网格内组合框selectedvalue或selectedtext的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在做Windows应用程序.我在datagridview中使用combobox.
我将id字段和文本字段绑定到cb ..它也填充了..但是我无法检索cb中选择的id或文本..请告诉我如何阅读它..
我正在使用VB.NET.

请帮助我....

Hi all,

I am doing a windows application. I am using combobox in datagridview.
i binded id field and text field to the cb..its filling also..but i can''t able to retrieve the id or text which is selected in the cb..will u pls tell me how to read it..
I am using VB.NET.

Please help me....

推荐答案

http://tinyurl.com/25onsss
使用google !!!
http://tinyurl.com/25onsss
use google!!!




您必须遍历datagridview的所有行.
在循环中,您将在每行内部直接广播组合框控件.

现在您可以获得控制值.


还设置了组合框displaymember(用于文本)和valuemember(用于ID)属性吗?

如果有帮助,请回复.

谢谢
Vaibhav
Hi,

You have to loop through all the rows of datagridview.
In loop, you will directcast the combobox control inside every row.

Now you can get control value.


Also have you set the combobox displaymember(for text) and valuemember(for ID) property ?

Reply if helpful.

Thanks
Vaibhav


这篇关于在数据网格内组合框selectedvalue或selectedtext的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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