如何在DataGridView的组合框中获取所选项目的值成员

问题描述:

我正在使用一个数据网格视图,其中第一列是产品名称,它是一个组合框列.在Form Load中,我在组合框中填充产品名称作为显示成员,产品ID作为值成员.
现在我要做的是,当我从组合框中选择任何产品时,我想显示其相关信息,我正在尝试按产品ID获取它. ???????

I am using A data grid view into which first column is the Product Name which is a Combo box Column. On Form Load i am filling Product names as display member and product id as value member in the combo box.
Now I want to do is when i am selecting any product from combo box i want to display its relate information,i am trying to get it by product id....How to do this?????????????????

环顾ComboBox属性,例如:SelectedValue,SelectedValuePath,DispalyMemberPath,ItemsSource.使用适当的源绑定,您可以非常轻松快捷地完成此操作.我可以为您提供更准确的答案,但需要查看带有DataGrid和ComboBox声明的代码.
Look around ComboBox properties like: SelectedValue, SelectedValuePath, DispalyMemberPath, ItemsSource. With proper sources binding you can do this very quick and easy. I could give you more accurate answer but need to see your code with DataGrid and ComboBox declaration.