从datagridviewcomboboxcolumn选择特定的值 [英] selecting specific value from datagridviewcomboboxcolumn

查看:147
本文介绍了从datagridviewcomboboxcolumn选择特定的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在datagridview中有datagridviewcomboboxcolumn
我已经用一个数据表说dt1填充了它,其中有一个列"ItemName"
所以它的所有值都填充到此列中
现在使用另一个数据表说dt2存在,它具有特定的项目名称,这意味着不同的行包含不同的项目名称
现在我想从dt2中的comboboxcolumn中选择特定的项目,这意味着应该在其中存在的列表中的datagridviewcomboboxcolumn中看到或选择该项目

请帮助

谢谢
Hardik Patadia

i have datagridviewcomboboxcolumn in datagridview
i have populated it with a datatable say dt1 which is having a column "ItemName"
so all the value of it is populated into this column
now using another datatable say dt2 is there which is having a specific itemname that means different rows contains different itemname
now i want to select specific item from comboboxcolumn which is there in dt2 that means that item should be seen or selected in the datagridviewcomboboxcolumn among the list which is there in it

Help Please

Thank You
Hardik Patadia

推荐答案

如果我理解正确,您想从数据表2中选择一个值,然后过滤datagridviewcomboboxcolumn的视图吗?

1.如果它们的格式都相同,则 linq [ [ ^ ]
If I understood correctly,you want to select a value from data table 2 and then filter the view of the datagridviewcomboboxcolumn?

1. if they are all in the same form then linq [^]is your friend.
2. if not then you need to do 1 + this[^]


这篇关于从datagridviewcomboboxcolumn选择特定的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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