将事件绑定到datagridview组合框 [英] Bind events to datagridview combobox

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

问题描述

我在大多数组合框的drowdown事件上执行以下命令(代码在组合框上有所不同但是想法相同)

I execute the following on the drowdown event for most of my comboboxes (code varies on the combobox but is the same idea)

TableAdapter.Fill(DataSet.table)
combobox.selectedindex = -1




如何通过数据绑定datagridview组合框执行相同的代码,我没有看到任何选项吗?


How can i execute the same code via a databound datagridview combobox, I do not see any options to do so?

推荐答案

这取决于你是否想要将每行的数据与当前值相关联,或者您只想通过DataGridViewComboBox提供选项。因此,对于我(或其他想要帮助的人)提供建议,需要更多信息。

It depends on if you want to relate each row's data to a current value or you simply want to provide options via the DataGridViewComboBox. So for me (or others wanting to assist) to provide suggestions more information is needed.


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

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