Here is the detail trace from NetAdvantage 10.3. I get it when I refresh the tree control (aka reload the UltraDataSource and set some columns as editable). So when I load the datasource the first time, no errors whatsoever. When it reloads and when I click on a node it give the following. Sometimes I can continue and other times I cannot and it crashes. It is deep in the bowels of Infragistics so can't step into the code to see what is going on. I have 5 bands where I set some cells to be checkboxes. The tree mode is Grid. The datasource is loaded manually. Has to do with checkboxes in the grid and Node - if I remove the code:
Node.Override.CellClickAction = CellClickAction.EditCell;
It no longer gives the error but I want to edit the checkboxes so it is required. Some rows have checkboxes but the root node has no checkbox. I can try to build a sample program if need be to look into this error.
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index at System.Collections.ArrayList.get_Item(Int32 index) at Infragistics.Win.UltraWinTree.TreeNodeCellsCollection.GetCell(Int32 index) at Infragistics.Win.UltraWinTree.TreeNodeCellsCollection.get_Item(UltraTreeNodeColumn column) at Infragistics.Win.UltraWinTree.UltraTree.get_ActiveCell() at Infragistics.Win.UltraWinTree.UltraTreeNode.internalExpand(Boolean value, Boolean notify, Boolean updateVisibleNodes) at Infragistics.Win.UltraWinTree.UltraTreeNode.set_Expanded(Boolean value) at Infragistics.Win.UltraWinTree.UltraTreeNode.Toggle() at Infragistics.Win.UltraWinTree.ExpansionIndicatorUIElement.Toggle() at Infragistics.Win.ExpansionIndicatorUIElement.OnMouseDown(MouseEventArgs e, Boolean adjustableArea, UIElement& captureMouseForElement) 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.UltraControlBase.OnMouseDown(MouseEventArgs 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)
Hello,
Could you please try to attach if possible a small sample project reproducing the above mentioned issue, I will be happy to take a look at it.
Please do not hesitate to ask if something comes up.
Here is the steps to get this sample application to error out:
Run Application:
Click on "Desc 0" - don't click on the checkbox
Hit F5 (Refresh)
Error out.
If you click on a row without a checkbox and hit F5 - no error
Any help would be greatly appreciated...
Hi,
This looks like a bug in the control. What's happening is that the tree is trying to evaluate the F5 key against it's KeyActionMappings to see if it should be handling this key. It doesn't actually handle F5, but it's also not expecting the entire structure of the tree to be changing in the KeyDown event. So during the KeyActionMappings evaluation, it's checking the tree's CurrentState and there's a variable which unexpectedly returns a null.
I'm going to ask Infragistics Developer Support to create a case for you and write this up in our system for developer review so we can get it fixed.
In the mean time, you can work around this in a couple of ways:
1) Use KeyUp instead of KeyDown to do your refresh.
2) Instead of calling Refresh directly from KeyDown, use a BeginInvoke so that it gets called after the KeyDown processing has completed.
Must still be doing something wrong, because it still crashes (not using Keys - using MenuStrip)...
I tried BeginInvoke
Run App and click on the Desc 0 node.
Hit F5 or right Mouse Click to Refresh (just to prove has nothing to do with KeyDown).
Now hit the BOMs - All Unique BOMs
Crash
I'm not sure what it means to call BeginInvoke on a delegate. There doesn't even seem to be any documentation on it. But it looks like this is calling the method on a separate thread, and when I do this I get a cross-thread exception. You probably didn't notice it because your code in the Refresher method is catching exceptions and ignoring them.
This is what I meant, and it works fine for me in your sample:
private void OnRefresh(object sender, EventArgs e) { this.BeginInvoke(new MethodInvoker(this.Refresher)); }
Also, I was not suggesting that you use KeyUp and also use a BeginInvoke. If you use KeyUp, you can simply call the method synchronously.
private void OnKeyUp(object sender, KeyEventArgs e) { this.Refresher(); }
This works fine for me in your sample, also.
Still crashes for me - updated the code to what I believe you were saying...
Click on Node with Checkbox.
Hit F5 or menu item from dropdown.
Click on Root Node or click on the + tree collapse button on the root node.
Now, clicking on the root node and getting the error - Continue out of error. Can then click on any node without any error until the next refresh. It is almost like Refresh needs to fake a click on a checkbox node (Select Node doesn't do the trick).
Hello haessd,
I created the following cases for you: 'CAS-87302-8R8V4V' and 'CAS-86798-900KZL' and will update you on these issues through them.
I wanted to know if you were able to solve your issue with the latest service releases of 11.2 and 12.1?