0
我正在使用我的應用程序中的DevExpress控件。我正在使用checkedComboBoxEdit,但是當我想要選擇兩個選項時,我直接在控件中有一個無效值錯誤。有人知道我爲什麼以及如何解決它? 謝謝!美好的一天!如何在CheckedComboBoxEdit中允許多個選擇?
private void checkedComboBoxEdit1_EditValueChanged(object sender, EventArgs e)
{
foreach (int items in checkedComboBoxEdit1.Properties.Items.GetCheckedValues())
Prueba(checkedComboBoxEdit1.Properties);
}
public void Prueba(RepositoryItemCheckedComboBoxEdit ri)
{
int cont = ri.Items.Count;
for (int i = 0; cont > i; i++)
{
var valor = ri.Items[i].Value;
}
}
該控件[顯然允許檢查多個值](https://documentation.devexpress.com/#WindowsForms/clsDevExpressXtraEditorsCheckedComboBoxEdittopic) - 您可以顯示用於檢查值的代碼,值是什麼以及*確切*你收到的錯誤。 – stuartd
分享一些代碼,你如何綁定checkedComboBoxEdit與數據源和你如何得到錯誤? –
您是使用用戶界面還是使用代碼檢查兩個項目?如果使用代碼,看起來你傳遞了一個不正確的值。請顯示你的代碼。 – user3185569