Odd problem with BindingSourceOdd problem with BindingSource
Old forum URL: forums.lhotka.net/forums/t/2484.aspx
ajj3085 posted on Wednesday, March 07, 2007
Hi,
I have a binding source bound to an object, and when I reset bindings, I get an odd IndexOutOfRangeException: Index -1 is out of range.
I haven't really made many changes to the form in question. The exception is from the currency manager, when the ReadWriteAuth control attempts to set security..
Message: IndexOutOfRangeException: Index -1 does not have a value.
Stack trace: at System.Windows.Forms.CurrencyManager.get_Item(Int32 index)
at System.Windows.Forms.CurrencyManager.get_Current()
at System.Windows.Forms.ErrorProvider.ErrorManager_CurrentChanged(Object sender, EventArgs e)
at System.Windows.Forms.ErrorProvider.ErrorManager_BindingsChanged(Object sender, CollectionChangeEventArgs e)
at System.ComponentModel.CollectionChangeEventHandler.Invoke(Object sender, CollectionChangeEventArgs e)
at System.Windows.Forms.BindingsCollection.OnCollectionChanged(CollectionChangeEventArgs ccevent)
at System.Windows.Forms.BindingsCollection.Remove(Binding binding)
at System.Windows.Forms.BindingContext.UpdateBinding(BindingContext newBindingContext, Binding binding)
at System.Windows.Forms.Control.UpdateBindings()
at System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(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 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)
Source: System.Windows.Forms
ajj3085 replied on Wednesday, March 07, 2007
I should add I'm using Csla 2.1.4...
Copyright (c) Marimer LLC