Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Data Binding / May 2006

Tip: Looking for answers? Try searching our database.

combobox binding

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fanor - 27 Apr 2006 15:21 GMT
I have a combo box bound to a binding source wich is bound to a table. For
some reason the selectedvalue of the combo box doesn't show the correctt
value of the row the first time the form is showed. When I move to the next
row using a binding navigator the combobox selectedvalue have the correct
value and come back to the first record and it shows the correct value.

For instance if the field value is 2, the combobox selectedvalue is 0, it
looks that the binding is not working yet.
I tried using combobox.refresh() and changinng bindingsource.position  on
the form_load and still doesn't work.

I also have other forms using combo box and they work without any problem.

I have setup displaymember and value member.

Any help is very appreciated.
Pavel - 30 Apr 2006 15:48 GMT
I am having exactly same problem.
I tried the following methods of BindigSource:

EndEdit()
ResetCurrentItem()
ResetBindings(false)
Position = ...
SuspendBinding() + ResumeBinding()

but none of the helped..
fanor - 02 May 2006 17:41 GMT
>I am having exactly same problem.
> I tried the following methods of BindigSource:
[quoted text clipped - 8 lines]
> ---
> Posted via www.DotNetSlackers.com

I solved changing by code the combobox.selectedindex property  in Form_load
event.
CBKowitz - 23 May 2006 20:11 GMT
Adding BindingSource.ResetBindings(False) to the Form Load Event fixed the
problem for me.

> >I am having exactly same problem.
> > I tried the following methods of BindigSource:
[quoted text clipped - 11 lines]
> I solved changing by code the combobox.selectedindex property  in Form_load
> event.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.