We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Databound Grid Problems

Thread ID:





26888 Apr 3,2005 11:01 AM UTC Apr 12,2005 02:30 AM UTC WinForms 5
Tags: GridControl
Ken Law
Asked On April 3, 2005 11:01 AM UTC

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 came out a few things in my UI broke and these were traced to known problems so I downloaded 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

Administrator [Syncfusion]
Replied On April 3, 2005 12:22 PM UTC

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. http://www.syncfusion.com/Support/user/uploads/GDBG_masterdetails_200baa5d.zip

Ken Law
Replied On April 5, 2005 06:48 PM UTC

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?

Ken Law
Replied On April 10, 2005 02:39 PM UTC

Clay, 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. -Ken ReproSyncBug_1012.zip

Administrator [Syncfusion]
Replied On April 11, 2005 10:09 AM UTC

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.) InitializeComponent(); this.dbgMasterCycles.BindingContext = this.BindingContext;this.dbgMasterReadings.BindingContext = this.BindingContext;

Ken Law
Replied On April 12, 2005 02:30 AM UTC

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.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon