程序员,在ribbon bar中,我加入了两个combox
在想要用代码设置他们的selectitem时遇到了困难。
经过了反复的折腾,终于想到去devexpress网站去提问,
https://www.devexpress.com/Support/Center/Question/Details/T159381
才知道,自己犯了傻。
combox 从属于repositoryItemComboBox
repositoryItemComboBox从属于BarEditItem
,要设置combox的值,只需要直接设置BarEditItem的EditValue就OK了。
barEditCMLabel.EditValue = "TestValue";