views:

8

answers:

0

I have a user control that fills a combo from DB overriding the OnLoad. A form containing the control has tabs and the control goes into the 3rd tab. Within the form_Load i set the value for the combo.

My problem is that the user control onload is not fired until the form_load is completed, therefore my combo.items is not populated and the value i set is lost. If my user control was in the first tab it would work all right because the OnLoad would be fired just before the form_load.

I could solve the problem forcing the combo to be filled from the from_load (eg MyUserCtrl.Fillcbo()) but I intended the fill of the combo to be transparent for the client using the usercontrol.

Any suggestions?