Trent L. Taylor (09/26/2008)
What is the full stack trace so we can see what "object" and method that is this failing on. There are a lot of possible causes on this one. The more information you could provide the better. The ListChanged event is nothing more than an implementation of the IBindingList which notifies any bound objects that the contents of the List (collection) has been changed so to take appropriate action (which is generally a refresh). So it sounds like when you are repopulating the BO that one of the controls to which it is bound is expected something that is not there.Here is the full stack trace:
at Trinity.Forms.Notes.grdViewNoteLog_RowEnter(Object sender, DataGridViewCellEventArgs e) in F:\Trinity_new\Trinity\Forms\Notes.cs:line 255
at System.Windows.Forms.DataGridView.OnRowEnter(DataGridViewCellEventArgs e)
at System.Windows.Forms.DataGridView.OnRowEnter(DataGridViewCell& dataGridViewCell, Int32 columnIndex, Int32 rowIndex, Boolean canCreateNewRow, Boolean validationFailureOccurred)
at System.Windows.Forms.DataGridView.SetCurrentCellAddressCore(Int32 columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean validateCurrentCell, Boolean throughMouseClick)
at System.Windows.Forms.DataGridView.SetAndSelectCurrentCellAddress(Int32 columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean validateCurrentCell, Boolean throughMouseClick, Boolean clearSelection, Boolean forceCurrentCellSelection)
at System.Windows.Forms.DataGridView.DataGridViewDataConnection.MatchCurrencyManagerPosition(Boolean scrollIntoView, Boolean clearSelection)
at System.Windows.Forms.DataGridView.DataGridViewDataConnection.ProcessListChanged(ListChangedEventArgs e)
at System.Windows.Forms.DataGridView.DataGridViewDataConnection.currencyManager_ListChanged(Object sender, ListChangedEventArgs e)
at System.Windows.Forms.CurrencyManager.OnListChanged(ListChangedEventArgs e)
at System.Windows.Forms.CurrencyManager.List_ListChanged(Object sender, ListChangedEventArgs e)
at System.ComponentModel.ListChangedEventHandler.Invoke(Object sender, ListChangedEventArgs e)
at MicroFour.StrataFrame.Business.BusinessBindingSource.OnListChanged(ListChangedEventArgs e)
at MicroFour.StrataFrame.Business.BusinessBindingSource.BusinessObject_CurrentDataTableRefilled()
at MicroFour.StrataFrame.Business.BusinessLayer.raise_CurrentDataTableRefilled()
at MicroFour.StrataFrame.Business.BusinessLayer.OnCurrentDataTableRefilled()
at MicroFour.StrataFrame.Business.BusinessLayer.ChangeCurrentDataTable(DataTable NewTable, Boolean AcceptChanges, Boolean IsSharedTable)
at MicroFour.StrataFrame.Business.BusinessLayer.ChangeCurrentDataTable(DataTable NewTable, Boolean AcceptChanges)
at MicroFour.StrataFrame.Business.BusinessLayer.ChangeCurrentDataTable(DataTable NewTable)
at MicroFour.StrataFrame.Business.BusinessLayer.FillDataTable(DbCommand CommandToExecute)
at Trinity.BusinessObjects.boViewNoteLog.GetClientNotes(Int32 tnClient_pk) in F:\Trinity_new\Trinity\BusinessObjects\boViewNoteLog.cs:line 75
at Trinity.Forms.Notes.GetClientNotes(Int32 tnclient_pk) in F:\Trinity_new\Trinity\Forms\Notes.cs:line 31
at Trinity.Forms.Prospects.tbrMaintenance_ItemClicked(Object sender, ToolStripItemClickedEventArgs e) in F:\Trinity_new\Trinity\Forms\Prospects.cs:line 410
at System.Windows.Forms.ToolStrip.OnItemClicked(ToolStripItemClickedEventArgs e)
at System.Windows.Forms.ToolStrip.HandleItemClick(ToolStripItem dismissingItem)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.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)