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 / Languages / C# / June 2007

Tip: Looking for answers? Try searching our database.

select items in winform dropdown style combobox...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
trint - 26 Jun 2007 17:58 GMT
In my winform, I have 3 dropdown style comboboxes.  I want the program
to always start with
the "Todays date" to be selected in the three comboboxes.

example of todays date selected by using all three combo dropdown
boxes:
cboDropDownStyle1 = June | cboDropDownStyle2 = 26 | cboDropDownStyle3
= 2007

Those items already exist in the comboboxes, I just want them
automatically selected when the program starts selecting correct items
reflecting TODAY'S date.
I know how to get todays date and all, just don't know how to SELECT
the items
in the dropdown comboboxes.

Any help is appreciated,
Thanks,
Trint
RaviGubbi@gmail.com - 26 Jun 2007 18:10 GMT
Try this
    cboDropDownStyle.SelectedItem = ThisMonth;
OR
       cboDropDownStyle.SelectedIndex = 5;

Ravi
trint - 27 Jun 2007 12:30 GMT
On Jun 26, 1:10 pm, RaviGu...@gmail.com wrote:
> Try this
>         cboDropDownStyle.SelectedItem = ThisMonth;
> OR
>         cboDropDownStyle.SelectedIndex = 5;
>
>  Ravi

thanks, that was it!
Trint

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.