ComboBox Bugs 
Author Message
 ComboBox Bugs

Is this a bug or is there a way around it

Put a combobox on a tabcontrol with two tabs.Populate it with a datasource
and set its listindex to -1(No item shown) click the second tab and then
back. The combo show the first entry.

This cause a problem as my form contains many combos and if a user flicks
through the tab and clicks the save button, wrong data is saved.

Does any one know a fix?



Mon, 09 May 2005 21:49:15 GMT  
 ComboBox Bugs
I have had the same exact problem.
I saw that everytime the combobox is being refresh, it recals teh
selectedItem event and select the first one.  On the from show sometimes,
and all the time on a Tab Control navigation.

I never found how to correct the problem, so I made a pass trought with an
intermediate form asking for information so I always have defaut value, but
I don't like it.

I would like to have an answer for thi me too.

Mike


Quote:
> Is this a bug or is there a way around it

> Put a combobox on a tabcontrol with two tabs.Populate it with a datasource
> and set its listindex to -1(No item shown) click the second tab and then
> back. The combo show the first entry.

> This cause a problem as my form contains many combos and if a user flicks
> through the tab and clicks the save button, wrong data is saved.

> Does any one know a fix?



Tue, 10 May 2005 09:38:04 GMT  
 ComboBox Bugs
Michel
I have been trying a few tricks on this one and this is what I have found.

If you set the selectedIndex Value to -1 in the Form_Load event then the
problem goes away
 but if you construct the form and populate the combos and set the
selectedindex Value to -1 anywhere else then the problem comes back.
 I Hope this helps

Frederick



Quote:
> I have had the same exact problem.
> I saw that everytime the combobox is being refresh, it recals teh
> selectedItem event and select the first one.  On the from show sometimes,
> and all the time on a Tab Control navigation.

> I never found how to correct the problem, so I made a pass trought with an
> intermediate form asking for information so I always have defaut value,
but
> I don't like it.

> I would like to have an answer for thi me too.

> Mike



> > Is this a bug or is there a way around it

> > Put a combobox on a tabcontrol with two tabs.Populate it with a
datasource
> > and set its listindex to -1(No item shown) click the second tab and then
> > back. The combo show the first entry.

> > This cause a problem as my form contains many combos and if a user
flicks
> > through the tab and clicks the save button, wrong data is saved.

> > Does any one know a fix?



Tue, 10 May 2005 20:49:30 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. COMBOBOX BUG???

2. ComboBox bug in Win2000??

3. strange ComboBox bug

4. strange ComboBox bug

5. Workaround for ComboBox bug?

6. Workaround for ComboBox bug?

7. ComboBox Bug??: Click Arrow, ListIndex = -1... Regardless of ACTUAL LIST INDEX???

8. Cursor bug with combobox ??!

9. BUG: ComboBox as the first control on an UserControl

10. Bug in ComboBox

11. Bound ComboBox "Bug"?

12. Non-bugged combobox in DataGrid?

 

 
Powered by phpBB® Forum Software