Calling BindingSource.AddNew() causes System.NotSupportedException
When the form loads I call 'Me.SharedBindingSource.AddNew()' as I want to display in my form a single row of data with the default column values. However, on calling the method I always get the exception below.
I have used this before in a similar project but I cannot tell why it is not working this time around.
Exception details:
System.NotSupportedException was unhandled by user code
Message="Specified method is not supported."
Source="System.Data"
StackTrace:
at System.Data.DataViewManager.System.ComponentModel.IBindingList.AddNew()
at System.Windows.Forms.BindingSource.AddNew()
at WinPresentationLayer.StartForm.StartForm_Load(Object sender, EventArgs e) in D:\WinPresentationLayer\Forms\StartForm.vb:line 15
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
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.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.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)
Thanks
Mark

