I have two gdb grids in a parent-child relationship where I filter the dependent grid''s dataview based on the row selection in the parent grid. This code has been running quite a while seemingly without problems.
When 18.104.22.168 came out a few things in my UI broke and these were traced to known problems so I downloaded 22.214.171.124 beta which I am using.
When I try to add a row to the dependent grid, it looks like it will work, but when I move the row selection in the parent grid, the new row appears in the wrong dataview. Below are the exceptions I''m seeing in the Ouput. The first one happens most often, the second one sometimes. I''m really hoping this is another know problem.
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 Syncfusion.Windows.Forms.Grid.GridScroll.RecalcHiddenRowState(Int32 start, Int32 end)
at Syncfusion.Windows.Forms.Grid.GridControlBase.ModelRowsRangeRemoved(Object sender, GridRangeRemovedEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridModel.OnRowsRemoved(GridRangeRemovedEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridModel.RaiseRowsRemoved(GridRangeRemovedEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridModelRowOperations.OnRangeRemoved(GridRangeRemovedEventArgs e)
catched at Syncfusion.Windows.Forms.Grid.GridModelRowOperations.OnRangeRemoved(GridRangeRemovedEventArgs e) in :line 0
System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Windows.Forms.Grid.GridComboBoxCellModel.GetItemValue(Object dataSource, String valueMember, Object item)
at Syncfusion.Windows.Forms.Grid.GridComboBoxCellRenderer.OnKeyPress(KeyPressEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridCellRendererBase.ProcessKeyEventArgs(Message& m)
at Syncfusion.Windows.Forms.Grid.GridCellRendererBase.RaiseProcessKeyEventArgs(Message& m)
at Syncfusion.Windows.Forms.Grid.GridTextBoxControl.ProcessKeyMessage(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
at System.Windows.Forms.RichTextBox.WndProc(Message& m)
at Syncfusion.Windows.Forms.Grid.GridTextBoxControl.WndProc(Message& msg)
catched at Syncfusion.Windows.Forms.Grid.GridTextBoxControl.WndProc(Message& msg) in :line 0
ADAdministrator Syncfusion Team April 3, 2005 07:22 AM
Here is a master details sample. Can you tell me how to see the problem in this sample? I think the problem are are seeing has been corrected here, so if you can reproduce it this sample, I can check it against our latest code base.
KLKen LawApril 5, 2005 01:48 PM
Thanks Clay. The sample does not immediately exhibit the problem. I will try to modify it to be more like my program so I can reproduce the bug. Unfortunately I have a very important demo with customers in 2 days so it will be after that before I can get to it.
Any word on the next release?
KLKen LawApril 10, 2005 09:39 AM
Thanks again for sending the sample. Unfortunately I was unable to reproduce the bug with it. However, I took the time today to create a small program that does reproduce the bug by copying and pasting portions of the large program I''m working on.
There is a Readme.doc file in the solution folder that explains how to reproduce the bug along with some other notes.
ADAdministrator Syncfusion Team April 11, 2005 05:09 AM
I was able to avoid the problem in your sample by making sure both grid''s were using the same BindingCOntext as the parent form. I did this by setting these properties after your call to InitializeComponent. (I did not try this with the exact code bas you said you were using, I tried it with the later 3.2 code base.)
this.dbgMasterCycles.BindingContext = this.BindingContext;this.dbgMasterReadings.BindingContext = this.BindingContext;
KLKen LawApril 11, 2005 09:30 PM
Thanks Clay - that did the trick! I really appreciate the great support.
I have an older editor that did not exhibit the problem because both grids were in the same tab page and so got the same binding context. Although this problem is probably not a Syncfusion issue but rather a matter of the programmer understanding what''s going on with .NET data-binding, this still might be a good opportunity to update your documentation team. They should include this important tidbit of information in any parent-child grid documentation. Using parent-child grid relationships where all grids are independently managed by a docking manager is a very powerful solution to problems like the one I’m solving. Your Docking Manager makes it easy to build the solution.