Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WIndows control event question- constructor
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
WIndows control event question- constructor
Environment versions
Environment:
VB 8.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01241026
Message ID:
01241026
Views:
59
I created a custom lookup combobox contral based on mmcombobox. It has a browsable property called "Lookupcode" which is the key used to return an entitylist for the combobox to bind to. I set the lookupkey property to what I want as the key.

When I place the control on a form and run, it does not appear that the lookupkey property gets an assigned value until after the constructor fires. I see where the InitializeComponent method of the form assigns the value to the property.

The combobox makes a call to the lookup BO to get an entitylist for the object and bind the control to the results. Currently, I have the call in the BindingContextChanged method but don't think it is the best place since binding the control to the results causes the method to fire again. What is the best place to put code like this that needs to fire after the control's constructor?
Aubrey
Next
Reply
Map
View

Click here to load this message in the networking platform