ComboBox, using AutoSelectFirstItemOnValidateForNoSelection, errors after second invalid entry


ComboBox, using AutoSelectFirstItemOnValidateForNoSelection, errors...
Author
Message
Govinda Berrio
Govinda Berrio
StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)
Group: StrataFrame Users
Posts: 94, Visits: 481
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
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search