HighTechTalks DotNet Forums  

DataBindings and SelectedValue

Dotnet Framework (WinForms) microsoft.public.dotnet.framework.windowsforms


Discuss DataBindings and SelectedValue in the Dotnet Framework (WinForms) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Carl
 
Posts: n/a

Default DataBindings and SelectedValue - 02-09-2005 , 11:11 AM






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


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.