如何获取在数据网格视图的组合框中键入的文本 [英] How to Get Text Typed in Combo box of Data Grid View

查看:64
本文介绍了如何获取在数据网格视图的组合框中键入的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用数据网格视图显示产品信息,我有一个组合框,从中可以选择产品.我在表单加载时在组合框中填充产品(产品名称作为显示成员,产品ID作为值成员).我要做的是,当我在组合框中键入任何字符时,我想根据键入的字符来获取产品.为此,我试图获取Text属性,但Datagridview的组合框不可用.我通过Cell.Value属性获得了产品的价值,这没有用.

I am using Data grid view for showing information of a product,I have a combo box from where i select the product. I fill products(Product Name As Display Member and Product Id as Value Member) in the combo box on form load.I want to do is When i type any character into combo box i want to fetch product as per the character typed. For this i am trying to get Text property but it is unavailable for Combo box of Datagridview.I got Value of the product by Cell.Value Property which is not useful.

推荐答案

您好,
怎么样:DataGridViewCell.EditedFormattedValue

http://msdn.microsoft. com/en-US/library/system.windows.forms.datagridviewcell.editedformattedvalue%28v = VS.80%29.aspx [
Hi,
how about this: DataGridViewCell.EditedFormattedValue

http://msdn.microsoft.com/en-US/library/system.windows.forms.datagridviewcell.editedformattedvalue%28v=VS.80%29.aspx[^]


这篇关于如何获取在数据网格视图的组合框中键入的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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