C#-触发事件后缺少组合框项目 [英] C# - Combo Box item missing after an event fires

查看:125
本文介绍了C#-触发事件后缺少组合框项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



美好的一天!

任何人都可以帮助我解决此组合框问题.
我有一个绑定集合对象的combox框.

Hi,

Good Day!

Anyone can help me this combo box problem.
I have a combox box that bound a collection objects.

bdsItemCode.DataSource = SalesCostItem.GetSalesCostItemByCustVendTypeBranchAndSystemJob(objCurrentCustomerDTO.CustVendTypeCode, objTruckInvoice.BranchCode, objCurrentSpecialJobDetail.systemJobRelation);
cboItemCode.DataSource = bdsItemCode;
cboItemCode.DisplayMember = "SalesCostItemCode";



我的问题是,selectionIndexchange之后,某些项目将丢失或从下拉列表中隐藏.第一次加载时,组合框项目看起来很完整,但是在进行了几项选择之后,下拉列表中的某些项目丢失了.

有什么想法可以解决这个问题受到高度赞赏.



非常感谢.



My problem is some items will be missing or hiden from dropdownlist after selectionIndexchange. First load the combo box item looks complete, but after several item seletions some item from dropdown list are missing.

Is any idea to solved this problem is highly appreciated.



Thank you very much.

推荐答案

调试时检查bdsItemCode和cboItemCode的计数,可能是绑定数据源的问题
While debugging Check the Count of bdsItemCode and cboItemCode , May be the problem with binding datasource


这篇关于C#-触发事件后缺少组合框项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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