User Control Issues

C

cfps.Christian

I've created 4 user controls. 1 is the main control that holds the
other 3. When the form loads it takes an object and creates the first
user control which in turn takes aspects of the objects and creates
the other three user controls. In the new event of the three user
controls I set the values of the forms within the user controls
(generally combobox). Unfortunately this does not update the combobox
itself (my selectedindex is 2 and it displays 1). I can change these
things manually as if using the form just not by using code for some
reason.

I've tried update, invalidate, refresh, and a couple others that I've
forgotten to no avail. I've also tried to load the values in
UserControl_Load rather than New and didn't work. What am I doing
wrong?
 
C

cfps.Christian

No takers yet eh?

I'll attempt to further define my problem.

Combobox cbo = new Combobox();
cbo = LoadCombo(); // Insert values
cbo.SelectedIndex = 3;

I run this and the VISIBLE selected index has not changed, but when I
set a breakpoint to look at the values I can see that the selected
index that the control has recorded is 3. The same is true of my
DateTimePicker controls, the value property is what I want it to be
but it won't display what I want.

Is there a method I'm forgetting here that is not letting my controls
be bound correctly?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top