如何设置Office.CommandBarComboBox控件的数据源 [英] How can I set the datasource of Office.CommandBarComboBox controll
本文介绍了如何设置Office.CommandBarComboBox控件的数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨有问题,我想设置CommandBarComboBox数据源,并有一个显示值和一个DataValue。我怎样才能做到这一点。我可以使用foreach datarow additem向CommandBarComboBox添加项目,但我想要一个显示值和一个数据值。
谢谢
Hi have a problem, I want to set the CommandBarComboBox datasource, And have a display value and a DataValue. How can I do this. I can add items to the CommandBarComboBox, with a foreach datarow additem, but I want a display value and a datavalue.
Thanks
推荐答案
您无法将CommandBarComboBox绑定到数据源。您需要使用 CommandBarComboBox.AddItem Method()来添加每个值。 a> [ ^ ]
如需了解更多信息,请参阅: CommandBarComboBox接口 [ ^ ]
You can't bind CommandBarComboBox to the datasource. You need to add every single value using CommandBarComboBox.AddItem Method()[^]
For further information, please see: CommandBarComboBox Interface[^]
这篇关于如何设置Office.CommandBarComboBox控件的数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文