When trying to view columns for any band besides Invoice, I get the attached error. We are using NHibernate for our business objects and the child bands (Detail, NonStockItems, DistributedApproval) are HasMany collections of the Invoice object.
Any thoughts?
Here's the text of the exception:
System.InvalidOperationException: Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.BeginInvoke(Delegate method, Object[] args)
at Infragistics.Win.UltraWinGrid.Design.ColumnEditorPageControl.lvColumns_SelectedIndexChanged(Object sender, EventArgs e)
at Infragistics.Win.UltraWinGrid.Design.ColumnEditorPageControl.LoadColumnsList(Int32 indexToSelect)
at Infragistics.Win.UltraWinGrid.Design.ColumnEditorPageControl.Initialize(ColumnsCollection columns)
at Infragistics.Win.UltraWinGrid.Design.ColumnEditorPageControl..ctor(ColumnsCollection columns)
at Infragistics.Win.UltraWinGrid.Design.UltraGridDesignerDialog.SetTabPageFromTreeNode(UltraTreeNode node)
at Infragistics.Win.UltraWinGrid.Design.UltraGridDesignerDialog.treeView1_AfterSelect(Object sender, SelectEventArgs e)
at Infragistics.Win.UltraWinTree.UltraTree.OnAfterSelect(SelectEventArgs e)
at Infragistics.Win.UltraWinTree.UltraTree.FireEvent(TreeEventIds id, EventArgs e)
at Infragistics.Win.UltraWinTree.UltraTree.SelectNewSelection(SelectedNodesCollection selected, Boolean isRangeSelect, Boolean invalidate)
at Infragistics.Win.UltraWinTree.UltraTree.Infragistics.Win.ISelectionManager.SelectItem(ISelectableItem item, Boolean clearExistingSelection)
at Infragistics.Win.SelectionStrategySingle.OnMouseDown(ISelectableItem item, MouseMessageInfo& msginfo, Boolean forceDrag)
at Infragistics.Win.SelectionStrategySingle.OnMouseDown(ISelectableItem item, MouseMessageInfo& msginfo)
at Infragistics.Win.SelectionStrategySingle.OnMouseMessage(ISelectableItem item, MouseMessageInfo& msginfo)
at Infragistics.Win.ControlUIElementBase.ProcessMouseDownHelper(Object sender, MouseEventArgs e)
at Infragistics.Win.ControlUIElementBase.ProcessMouseDown(Object sender, MouseEventArgs e)
at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)
at Infragistics.Win.UltraWinTree.UltraTree.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.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)
Hi,
I took a look at the source code for the designer where the error is occurring and it looks like this code was changed very recently to use a BeginInvoke instead of calling the code directly.
But the code here is calling BeginInvoke on the control itself, so if you are at the point where you are clicking on the control, it's handle has to have been created. So the error message you are getting here does not seem possible. And I am unable to reproduce this behavior.
Can you describe exactly when this error message occurs? Is there some specific series of steps you have to follow to get this to happen?
Here's a simple example. I created a new project, referenced my business objects, added a grid and bound the grid to the invoice object. If you go into the "Bands and Columns" portion of the grid designer, expand the "Detail" band and click columns, the error will occur.
Hello,
I have logged this as a development issue with an ID# of 94709. I will make another post on this thread once the issue has been resolved. Please note that the issue will only be resolved in NetAdvantage 2010 Volume 3 and later since earlier versions are no longer being maintained.