数据绑定组合框DataGridView [英] Databound combobox DataGridView

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

问题描述

我有一个C#Winform datagridView,它的dataGridViewComboboxColumn绑定到对象的bindingList.当我从我的bindingList中删除一个项目/对象时,直到单击行或从dropDrow中选择一个项目,我的dataGridView组合框才会显示该项目已被删除.

我如何获得组合框以反映绑定列表中的更改而无需单击行?

I have a C# Winform datagridView that has a dataGridViewComboboxColumn that''s bound to a bindingList of objects. When I remove an item/object from my bindingList my dataGridView combobox does not show that the item has been removed until I click on a row or select an item from the dropDrow.

How do I get the combobox to reflect the changes in the bindinglist without having to click on the row?

推荐答案

我建​​议您使用GridView.Update()方法作为例程中要执行的最后一项.那应该刷新您的GridView.
I would suggest you use the GridView.Update() method as the last item to execute in your routine. That should refresh your GridView.


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

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