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 General / January 2006

Tip: Looking for answers? Try searching our database.

Set Text in DropDown

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mailptudo@gmail.com - 31 Jan 2006 12:04 GMT
Hello,

I have a DropDown that is bound with a array containing 3 strings:
First, Last, All. These options indicate how many objects the user
wants to analyze. So, the user shoud choose one of these options, or
type a number.

These information is then saved, to be reloaded later.

My problem is to load the configuration when a number was typed. I've
the DropDown bound and I want to write the number in the text field.
I'm doing the following:

CB_Counter.Text= counter.MaxValue.ToString();

but this doesn't work, because the selectedItem is not -1.... I've
tryed to do CB_Counter.SelectedIndex = -1;

but nothing happens, and the SelectedIndex remains 0.

Hope you can help me, thanks in advance!

ACC
Tim Wilson - 31 Jan 2006 12:23 GMT
> I've tryed to do CB_Counter.SelectedIndex = -1;
> but nothing happens, and the SelectedIndex remains 0.

This is a bug. You can set the SelectedIndex property to -1 twice as a
workaround.
http://support.microsoft.com/default.aspx?scid=kb;en-us;327244

Signature

Tim Wilson
.NET Compact Framework MVP

> Hello,
>
[quoted text clipped - 19 lines]
>
> ACC

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.