ComboBox, using AutoSelectFirstItemOnValidateForNoSelection, errors...

Author Message
 Posted 2/24/2014 10:15:16 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 5/8/2020 7:04:55 AM
Posts: 97, Visits: 499
Hello SF Devs, 

Can you confirm this bug that I am experiencing? 

I have an SF ComboBox bound to a business object integer property. It is setup to be an AutoComplete ComboBox (Mode: SuggestAppend) and the AutoSelectFirstItemOnValidateForNoSelection is set to true. 
It works fine until the user types a string that does not match any option in the dropdown and tabs off the control twice in a row.
At this point it will throw the following error: 

Specified cast is not valid.
   at GKGLibExamples.BusinessObjects.ItemsBO.FieldDescriptor.SetValue(Object component, Object value) in C:\Users\gberrio\Documents\Visual Studio 2008\Projects\GKGLib\GKGLibExamples\BusinessObjects\ItemsBO.Designer.cs:line 1767
   at System.Windows.Forms.BindToObject.SetValue(Object value)
   at System.Windows.Forms.Binding.PullData(Boolean reformat, Boolean force)

The value it is trying to set the property to is DBNull.

Reproduction Steps:
    - select the combobox
    - enter a string that does not return an auto suggest option
    - tab off the control
    - select the combobox again
    - enter a string that does not return an auto suggest option
    - ! ERROR !

http://forum.strataframe.net/Uploads/Images/c7e7d89c-a85c-4544-81e7-ca06.PNG





Tags:
Post #32463
Add to Twitter Add to Facebook


Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.