|
Edhy Rijo
|
|
|
Group: StrataFrame Users
Posts: 2.4K,
Visits: 23K
|
Hi, I am working with a DataGridView in a child form, if I cancel the childform with the follwing code: DialogResult = Windows.Forms.DialogResult.Cancel Then I get the following exception:
KeyNotFoundException
The given key was not present in the dictionary.
Source : mscorlib
Stack Trace:
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at MicroFour.StrataFrame.Business.BusinessLayer.get__CurrentDataTable(Boolean IsSharedTable)
at MicroFour.StrataFrame.Business.BusinessBindingSource.RemoveBOHandlers()
at MicroFour.StrataFrame.Business.BusinessBindingSource.Dispose(Boolean disposing)
at System.ComponentModel.Component.Dispose()
at System.ComponentModel.Container.Dispose(Boolean disposing)
at System.ComponentModel.Container.Dispose()
at CardTrackingSystem.frmActivateCardsItems.Dispose(Boolean disposing) in E:\Visual Studio 2008 Projects\StrataFrame\Card Tracking System Projects\CardTrackingSystem.NET\CTS Solution\Card Tracking System\Dialogs\Transaction Forms\Activate Cards\frmActivateCardsItems.Designer.vb:line 10
at System.Windows.Forms.Form.Close()
at MicroFour.StrataFrame.UI.Windows.Forms.ChildFormDialog.ShowDialog(Object[] Arguments)
at MicroFour.StrataFrame.UI.Windows.Forms.ChildFormDialog.ShowDialog()
at CardTrackingSystem.frmActivateCards.cmdAddCards_Click(Object sender, EventArgs e) in E:\Visual Studio 2008 Projects\StrataFrame\Card Tracking System Projects\CardTrackingSystem.NET\CTS Solution\Card Tracking System\Dialogs\Transaction Forms\Activate Cards\frmActivateCards.vb:line 800
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
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)
The DataGridView is being populated with a BBS and the error only happens if the grid has some data. I don't know what "Key" it may be looking for? Also I would like to note that the BO assigned to the BBS has come Custom Field Properties which are not used in the DataGridView.
Edhy Rijo
|
|
|
|
|
Trent Taylor
|
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
Guys, I am going to need a sample. I have not been able to reproduce this. The version of DevExpress that we currently have is 8.2, so I am wondering if there is a later version that you are running on that is causing the issue.
|
|
|
|
|
Bill Cunnien
|
|
|
Group: Forum Members
Posts: 785,
Visits: 3.6K
|
I am using v9.1.5. 9.2 is due out soon. I will uninstall 9.1.5 and reinstall 8.2 and see what happens.
|
|
|
|
|
Trent Taylor
|
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
Or...send me a sample and save the energy. I can change the references on this side, but I think that there is something going on with the grid and I would love to see if I am missing something at this point. Thanks.
|
|
|
|
|
Bill Cunnien
|
|
|
Group: Forum Members
Posts: 785,
Visits: 3.6K
|
I worked up a sample yesterday but it did not fail like my production application. That's why I started looking at assemblies. I'll post my findings here as soon as I get the DevEx 8.2.10 version installed.
Thanks!
Bill
|
|
|
|
|
Trent Taylor
|
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
|
|
|
|
|
Bill Cunnien
|
|
|
Group: Forum Members
Posts: 785,
Visits: 3.6K
|
Nothing is easy. What a killer downgrading to v8.2.10. So many errors to deal with in my codebase. It will be a little while for me to get through these. Sorry for the delay. Hope to have some more answers by the end of the day.
|
|
|
|
|
Bill Cunnien
|
|
|
Group: Forum Members
Posts: 785,
Visits: 3.6K
|
This is not funny. I am getting the same error. The same spot--SharedDataTableCollection class on the get_Item property retrieval. It's 4pm. Not likely I will solve this today. Four days, now, with absolutely no progress.
Is there a place for me to download 1.6.6? I'd like to go back to that version. Thanks.
|
|
|
|
|
Bill Cunnien
|
|
|
Group: Forum Members
Posts: 785,
Visits: 3.6K
|
Is the following code necessary (red highlight)? If so, why?
' From the BusinessBindingSource.vb in the Business Namespace
#Region " Protected Methods "
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
'-- Dispose of the internal list of business objects when done and clear
' the references to the pieces
If disposing Then
If Me._BusinessObjectList IsNot Nothing Then
For Each bo As BusinessLayer In Me._BusinessObjectList.Values
bo.Dispose()
Next
Me._BusinessObjectList.Clear()
End If
'-- Remove the reference to the business object
If Me._BusinessObject IsNot Nothing Then
[color=#FF0000]Me.RemoveBOHandlers()[/color]
Me._BusinessObject = Nothing
Me._BusinessObject_CurrentView = Nothing
End If
End If
'-- Base call
MyBase.Dispose(disposing)
End Sub
#End Region
Can I comment out the line and move on without big bad voodoo?
|
|
|
|
|
Bill Cunnien
|
|
|
Group: Forum Members
Posts: 785,
Visits: 3.6K
|
I commented out that code and everything works just fine. I am running SF 1.7.0 with DevEx 8.2.10. I am not going to take the next step and update DevEx. It appears that DevEx is not the issue (although, it could be somewhere in there...it is a complex issue, I suppose). Once I update DevEx to 9.1.5, I will report back here again. At least my app is running and I know that I can update the clients at this point.
Please let me know if I am doing serious damage by removing that code.
Thanks!
|
|
|
|
|
Bill Cunnien
|
|
|
Group: Forum Members
Posts: 785,
Visits: 3.6K
|
Bill Cunnien (07/30/2009) ...I am not going to take the next step and update DevEx.Actually, I am updating the DevEx tools. Slight typo there. Sorry. I meant to say, "I am now going to take the next step..."
|
|
|
|
|
Bill Cunnien
|
|
|
Group: Forum Members
Posts: 785,
Visits: 3.6K
|
Ok...I got there. I am now running on SF 1.7.0 and DevEx 9.1.5. Of course, I do still have that RemoveBOHandlers method commented out in the BBS class. I am going to make a couple of quick changes to other areas in my application, run some tests, then post the update. Looks like I am back in business!
|
|
|
|