ComboBoxEdit: "Specified Cast is not valid"


Author
Message
StarkMike
StarkMike
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Forum Members
Posts: 436, Visits: 944
I have a ComboBoxEdit (StrataFrame Wrapped version of DevExpress ComboBoxEdit) that is being populated using the PopulationDataSourceSettings property and is bound to a BO and the PopulationType property is set to BusinessObject.



The peculiar thing is that when i start typing in the ComboBoxEdit it begins autocompleting as I type. However if I misspell anyone of the entries in the combo an exception is thrown... Here is the stack:



Specified cast is not valid.



Exception (InvalidCastException): Message="Specified cast is not valid."; Source="STI"; Target=null; Tag=null;



Environment: ThreadIdentity="" DateTime=["2007-08-14 14:44:10.873"] ThreadName=null WindowsIdentity="STRUSS\MMurphy" ThreadId="10" DomainName="STI.vshost.exe" OSVersion=["Microsoft Windows NT 5.1.2600 Service Pack 2"] MachineName="1LPMMURPHY2" UserName="MMurphy"



Remaining Stack Trace

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

at STI.ReturnsBO.FieldRTCustomerIDDescriptor.SetValue(Object component, Object Value) in C:\Documents and Settings\MMurphy\My Documents\Visual Studio 2005\Projects\STI2K5\Business Objects\ReturnsBO.Designer.vb:line 987

at System.Windows.Forms.BindToObject.SetValue(Object value)

at System.Windows.Forms.Binding.PullData(Boolean reformat, Boolean force)

at System.Windows.Forms.Binding.TargetPropertyChanged(Object sender, EventArgs e)

at DevExpress.XtraEditors.Repository.RepositoryItemComboBox.RaiseSelectedValueChanged(EventArgs e)

at DevExpress.XtraEditors.ComboBoxEdit.UpdatePopupEditValueIndex(Int32 prevIndex)

at DevExpress.XtraEditors.ComboBoxEdit.setEditValue(Object value)

at DevExpress.XtraEditors.TextEdit.setText(String value)

at DevExpress.XtraEditors.TextEdit.SetTextCore(String text)

at DevExpress.XtraEditors.PopupBaseAutoSearchEdit.FindUpdateEditValueAutoSearchText()

at DevExpress.XtraEditors.PopupBaseAutoSearchEdit.ProcessFindItem(Int32 selectionStart, Char pressedKey)

at DevExpress.XtraEditors.PopupBaseAutoSearchEdit.ProcessAutoSearchChar(KeyPressEventArgs e)

at DevExpress.XtraEditors.PopupBaseAutoSearchEdit.ProcessChar(KeyPressEventArgs e)

at DevExpress.XtraEditors.PopupBaseAutoSearchEdit.OnEditorKeyPress(KeyPressEventArgs e)

at DevExpress.XtraEditors.BaseEdit.OnKeyPress(KeyPressEventArgs e)

at DevExpress.XtraEditors.TextEdit.OnMaskBoxKeyPress(Object sender, KeyPressEventArgs e)

at System.Windows.Forms.Control.OnKeyPress(KeyPressEventArgs e)

at DevExpress.XtraEditors.Mask.MaskBox.OnKeyPress(KeyPressEventArgs e)

at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)

at DevExpress.XtraEditors.TextBoxMaskBox.ProcessKeyEventArgs(Message& m)

at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)

at System.Windows.Forms.Control.WmKeyChar(Message& m)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.TextBoxBase.WndProc(Message& m)

at System.Windows.Forms.TextBox.WndProc(Message& m)

at DevExpress.XtraEditors.Mask.MaskBox.BaseWndProc(Message& m)

at DevExpress.XtraEditors.Mask.MaskBox.MaskStrategy.SimpleStrategy.DoWndProc(Message& m)

at DevExpress.XtraEditors.Mask.MaskBox.WndProc(Message& m)

at DevExpress.XtraEditors.TextBoxMaskBox.WndProc(Message& msg)

at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)

at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)





Not sure what is going on. Any ideas?
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