G
Guest
Hi,
I use VS2003 and C# with windows form.
I have one combobox bind to an Objsourcelist (CollectionBase) who contains
some ObjSource object with "Description" and "ID".
--------------------------------------------------------------------------
cmbFLSOURCE.DataSource = Objsourcelist;
cmbFLSOURCE.DisplayMember = "Description";
cmbFLSOURCE.ValueMember = "ID";
---------------------------------------------------------------------------
When I run the form, everything is display ok, so I can see objsource
description values. However, when I add binding to the dataset for the
SelectedValue using my dataset table "Expense.fl_source" which match the
valueMember "ID", it never display the corresponding value Description, and
display blank value. Others fields bind to the same dataset show the right
information.
----------------------------------------------------------------------------
Binding b;
b = cmbFLSOURCE.DataBindings.Add("SelectedValue", myDSexpense,
"Expense.fl_source");
-----------------------------------------------------------------------------
Is there anything missing?
Thanks in advance.
CB
I use VS2003 and C# with windows form.
I have one combobox bind to an Objsourcelist (CollectionBase) who contains
some ObjSource object with "Description" and "ID".
--------------------------------------------------------------------------
cmbFLSOURCE.DataSource = Objsourcelist;
cmbFLSOURCE.DisplayMember = "Description";
cmbFLSOURCE.ValueMember = "ID";
---------------------------------------------------------------------------
When I run the form, everything is display ok, so I can see objsource
description values. However, when I add binding to the dataset for the
SelectedValue using my dataset table "Expense.fl_source" which match the
valueMember "ID", it never display the corresponding value Description, and
display blank value. Others fields bind to the same dataset show the right
information.
----------------------------------------------------------------------------
Binding b;
b = cmbFLSOURCE.DataBindings.Add("SelectedValue", myDSexpense,
"Expense.fl_source");
-----------------------------------------------------------------------------
Is there anything missing?
Thanks in advance.
CB