形成所有文本框,组合框从acctPackageBindingSource绑定。我在组合框中进行双击而只显示int值的问题意味着它来自acctPackage。我想显示名称意味着该值的“显示成员”。那个来自不同表名的是sysCode。那么如何才能完美展示显示器成员呢?以下是我的代码
// Here the all value is coming form Syscode table .
public void FillDropDown()
{
if (_commonComponent == null)
_commonComponent = new CommonComponent();
List<SysCode> _syscode = _commonComponent.GetByTableCodeForIncomeDedMapping("19");
bindingSourceSysCode.DataSource = _syscode;
packageCodeComboBox.DataSource = bindingSourceSysCode;
packageCodeComboBox.DisplayMember = "Desclong2";
packageCodeComboBox.ValueMember = "PackageCode";
}
//This part is bind my all value on the form
private void FillAcctPackage()
{
if (_commonComponent == null)
_commonComponent = new CommonComponent();
acctPackageBindingSource.DataSource = _commonComponent.GetAcctPackge();
}