C# Windows Form Databound Listbox Problem - Help!!

  • Thread starter Thread starter Wade Beasley
  • Start date Start date
W

Wade Beasley

I have developed a Windows Forms application with C#. On the windows
form I have a master list box with the names of people the user can
select from and when selected it calls a Select in SQL server to gather
the appropriate information. It is then populated onto a multi-tab
portion on the right of the screen. On the 3rd tab I have 2
multi-select listboxes. The problem is on the first time I go to the
tab for the first name the 2 multi-select listboxes are not highlighting
the items that should be. If the user selects another name then
reselects the first one, it works okay. I can not figure out why it is
not highlighting on the first time????? I have tried doing refreshes
on the controls when I load the data. I have tried refreshing the tabs
too. Nothing seems to work. It is like it lost context the first time.
I am about ready to pull out the few hairs on my head. Any help would
greatly be appreciated.

Thanks,
Wade Beasley
 
after you filled the listbox containing the names did you try setting the
selection explicitlly like this for example:

fillNamesListBox();
myListBox.SelectedItem = 0;
 
Back
Top