Windowsでは、すべてのテキストボックスとコンボボックスが acctPackageBindingSource からバインドされます。int 値のみを表示するコンボボックスでのバインドに関する私の問題は、それが acctPackage から来ることを意味します。そして、名前を表示したいのは、その値の「Displaymember」を意味します。その 1 つは、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();
}