本文介绍了数据绑定到ToolstripDropdown中的ToolstripcomboBox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

注意到将数据绑定到ToolstripComboBox.Combobox的奇怪行为,将其添加到ToolstripDropdown或Contextmenu中.通常我通过以下代码将SQL数据绑定到ToolstripcomboBox.Combobox.

noticed the strange behavior of Databinding to ToolstripComboBox.Combobox when it is being added to ToolstripDropdown or Contextmenu. Normally I''m binding SQL data to ToolstripcomboBox.Combobox by following code.

<br />  Me.tspcbxTest.ComboBox.ValueMember = "ID"<br />  Me.tspcbxTest.ComboBox.DisplayMember = "Column_to_Dispaly"<br />  Me.tspcbxTest.ComboBox.FormattingEnabled = True<br />  Me.tspcbxTest.ComboBox.DataSource = Me.Table1BindingSource<br />  Me.Table1TableAdapter.Fill(Me.DataSet1.Table1)<br />


尽管它在ToolStrip或MenuStrip上的ToolstripcomboBox(es)上完美运行,但在ToolStripSpiltButton(或)ToolStripDropdown(或)Contextmenu上失败. :(


Though it works perfect on ToolstripcomboBox(es) on ToolStrip or MenuStrip, failed on ToolStripSpiltButton (or) ToolStripDropdown (or) Contextmenu.

Thanking in advance.
Please! :(

推荐答案


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

10-28 00:56