Error System.ArgumentOutOfRangeException: Value of '-1' is not valid for 'Value'. 'Value' should be...


Error System.ArgumentOutOfRangeException: Value of '-1' is not valid...
Author
Message
Leonard P.
Leonard P.
StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)
Group: Awaiting Activation
Posts: 65, Visits: 306
Hi,

I am getting a Framework error (see more info below), when opening maintenance form from the main window:



ProductMaintenance maintForm = new ProductMaintenance(this.factSheetReportBO.Product_Id);

maintForm.ShowDialog(this);




The main window passes in PK_ID and maintenance form navigates to that ID. The error only happens for one specific PK ID. There's nothing special about this ID, I can't figure out why it would fail on that ID.

By looking at the error message can you tell me what can be causing it, or at least point me to the right direction?





System.ArgumentOutOfRangeException: Value of '-1' is not valid for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'.\rParameter name: Value\r at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)\r at System.Windows.Forms.Binding.SetPropValue(Object value)\r at System.Windows.Forms.Binding.PushData(Boolean force)\r at System.Windows.Forms.Binding.UpdateIsBinding()\r at System.Windows.Forms.Binding.CheckBinding()\r at System.Windows.Forms.Binding.SetListManager(BindingManagerBase bindingManagerBase)\r at System.Windows.Forms.ListManagerBindingsCollection.AddCore(Binding dataBinding)\r at System.Windows.Forms.BindingsCollection.Add(Binding binding)\r at System.Windows.Forms.BindingContext.UpdateBinding(BindingContext newBindingContext, Binding binding)\r at System.Windows.Forms.Control.UpdateBindings()\r at System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)\r at System.Windows.Forms.ContainerControl.

OnCreateControl()\r at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)\r at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)\r at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)\r at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)\r at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)\r at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)\r at System.Windows.Forms.Control.CreateControl()\r at System.Windows.Forms.Control.WmShowWindow(Message& m)\r at System.Windows.Forms.Control.WndProc(Message& m)\r at System.Windows.Forms.ScrollableControl.WndProc(Message& m)\r at System.Windows.Forms.ContainerControl.WndProc(Message& m)\r at System.Windows.Forms.Form.WmShowWindow(Message& m)\r at System.Windows.Forms.Form.WndProc(Message& m)\r at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)\r at System.Windows.Forms.Control.ControlN

ativewindow.WndProc(Message& m)\r at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)"



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