StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
Issues
»
TargetInvocationException using...
TargetInvocationException using MicroFour.StrataFrame.UI.Windows.Forms.DevEx.ComboBoxEdit
Post Reply
Like
0
TargetInvocationException using...
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Lukasz Kustusz
Lukasz Kustusz
posted 14 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 29,
Visits: 125
Hello
I have a MicroFour.StrataFrame.UI.Windows.Forms.DevEx.ComboBoxEdit on a SF DevEx MaintenanceForm, which is bound to a BO1. The Combo box has BO1 in BusinessObject property and I filled BindingField to one of the fields in BO1 (btw, how come there's no dropdown on the BindingField on DevEx controls from the Inherited UI wrapper, like there is for native Strataframe controls?) I also fill some values in Edit Values item of the context menu for the control. They are stored in Items collection.
At runtime, whenever I choose one of the items from the list I get this:
TargetInvocationException
Property accessor 'SelectedValue' on object 'MicroFour.StrataFrame.UI.Windows.Forms.DevEx.ComboBoxEdit' threw the following exception:'Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index'
ArgumentOutOfRangeException
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Source : System
Stack Trace:
at System.Collections.ArrayList.get_Item(Int32 index)
at MicroFour.StrataFrame.UI.Windows.Forms.ComboBoxItemCollection.get_Item(Int32 Index)
at MicroFour.StrataFrame.UI.Windows.Forms.DevEx.ComboBoxEdit.get_SelectedValue()
at System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component)
at System.Windows.Forms.Binding.GetPropValue()
at System.Windows.Forms.Binding.PullData(Boolean reformat, Boolean force)
at System.Windows.Forms.Binding.Target_PropertyChanged(Object sender, EventArgs e)
at DevExpress.XtraEditors.Repository.RepositoryItemComboBox.RaiseSelectedValueChanged(EventArgs e)
at DevExpress.XtraEditors.ComboBoxEdit.UpdatePopupEditValueIndex(Int32 prevIndex)
at DevExpress.XtraEditors.ComboBoxEdit.set_EditValue(Object value)
at DevExpress.XtraEditors.PopupBaseEdit.AcceptPopupValue(Object val)
at DevExpress.XtraEditors.PopupBaseEdit.UpdateEditValueOnClose(PopupCloseMode closeMode, Boolean acceptValue, Object newValue, Object oldValue)
at DevExpress.XtraEditors.PopupBaseEdit.DoClosePopup(PopupCloseMode closeMode)
at DevExpress.XtraEditors.PopupBaseEdit.ClosePopup(PopupCloseMode closeMode)
at DevExpress.XtraEditors.PopupBaseEdit.ClosePopup()
at DevExpress.XtraEditors.Popup.PopupListBox.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at DevExpress.Utils.Controls.ControlBase.WndProc(Message& m)
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)
And the combobox gets red x icon on the left saying "invalid item".
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
TargetInvocationException using...
Lukasz Kustusz
-
14 Years Ago
I have some new developments in this issue. I tried to replace the...
Lukasz Kustusz
-
14 Years Ago
Likely the problem is that BindingProperty isn't setup correctly. This...
Greg McGuffey
-
14 Years Ago
Greg, Thank you for your help. You pointed me in the right...
Lukasz Kustusz
-
14 Years Ago
Excellent. I thought that might be the problem and often you just have...
Greg McGuffey
-
14 Years Ago
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search