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 / October 2004

Tip: Looking for answers? Try searching our database.

When does a control get its items?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
acedev@hotmail.com - 04 Oct 2004 17:00 GMT
Hi all,

I have a databound checkedlistbox on my form. In Page_Load I call a
combobox1_selectedindexchanged event - the code in this event loops
through the items in the checkedlistbox setting the CheckState for
particular items.

The only problem is when I raise the selectedindexchanged event in
Page_Load there are no items in the checkedlistbox! The checkedlistbox
returns a count of 0. After the form is visible the checkedlistbox has
items.

I am using C#, and would like to know:

1. When do the items for the checkedlistbox get loaded

and

2. Which event should I use if Page_Load is not suitable?
Thanks for your help

Stuart
mklapp - 04 Oct 2004 19:09 GMT
Whatever the control is bound to must be populated.  If it is populated after
it is bound to the control, one of the databinding methods should be invoked.
(control.binddata or something like it).

> Hi all,
>
[quoted text clipped - 18 lines]
>
> Stuart

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.