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. Image for the cookie policy date

Problem deleting newly added row from DBG

Hi, There is an exception while deleting newly added row from a databound grid (1.6.1.5 VS.NET 2003/XP or win2k). Steps for reproducing: 1. Start the filter bar grid sample. 2. Go to the last empty row and type in "abc" in CustomerID column, hit tab and enter "abc" as company name. 3. Click on the same row header (without switching the row) and hit delete button. 4. Notice the error "There is no at position 91.". FYI, it works: - If I just type "abc" in company id and then select the row and hit delete key - If I type in abc/abc in company id and company name and then switch to the row above last row (WOLZA), come back to "abc" and then delete the row. Can you please look into this. thanks, - Reddy

6 Replies

AD Administrator Syncfusion Team October 9, 2003 06:11 PM UTC

I see the problem. We'll fix that. Stefan


AD Administrator Syncfusion Team October 23, 2003 05:51 PM UTC

Hi, I got 1.6.1.8 version of syncfusion libraries yesterday. I am using Vs.NET 2003/win2k. This bug seems to be fixed in the demo, I reported earlier. But in my code, I still see this problem once in a while (it is randomly failing). Here is the stack trace: catched at Syncfusion.Windows.Forms.Grid.GridDataBoundGrid.EndEdit() in :line 0 System.IndexOutOfRangeException: There is no row at position 1. at System.Data.DataView.GetRecord(Int32 recordIndex) at System.Data.DataView.IsOriginalVersion(Int32 index) at System.Data.DataRowView.SetColumnValue(DataColumn column, Object value) at System.Data.DataColumnPropertyDescriptor.SetValue(Object component, Object value) at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.EndEdit() at Syncfusion.Windows.Forms.Grid.GridDataBoundGrid.EndEdit() thanks, - Reddy


AD Administrator Syncfusion Team October 29, 2003 05:06 PM UTC

I nailed this bug down. When I am editing in a cell, then try to delete that row, I got the exception. I am now checking if current cell IsEditing, I am calling CurrentCell.EndEdit() and Binder.EndEdit(). It is working fine now. thanks, - Reddy


SY Syl March 18, 2004 04:29 PM UTC

hi just to say that I have the same problem i insert some rows in a your datagrid... I modify a row then, when i delete a row, the exception throws here is the stack trace : ex.StackTrace " at System.Data.DataView.IsOriginalVersion(Int32 index) at System.Data.DataRowView.GetColumnValue(DataColumn column) at System.Data.DataColumnPropertyDescriptor.GetValue(Object component) at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.QueryCellInfo(GridQueryCellInfoEventArgs e) at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.Syncfusion.Windows.Forms.Grid.IGridModelDataProvider.QueryCellInfo(GridQueryCellInfoEventArgs e) at Syncfusion.Windows.Forms.Grid.GridModel.GetCellInfo(Int32 rowIndex, Int32 colIndex, GridStyleInfo style) at Syncfusion.Windows.Forms.Grid.GridModel.Syncfusion.Windows.Forms.Grid.IGridVolatileDataContainer.GetCellInfo(Int32 rowIndex, Int32 colIndex, GridStyleInfo style) at Syncfusion.Windows.Forms.Grid.GridVolatileData.get_Item(Int32 rowIndex, Int32 colIndex) at Syncfusion.Windows.Forms.Grid.GridModel.get_Item(Int32 rowIndex, Int32 colIndex) at Syncfusion.Windows.Forms.Grid.GridControlBase.GetViewStyleInfo(Int32 rowIndex, Int32 colIndex, Boolean forceQueryCellInfo) at Syncfusion.Windows.Forms.Grid.GridControlBase.GetViewStyleInfo(Int32 rowIndex, Int32 colIndex) at Syncfusion.Windows.Forms.Grid.GridControlBase.GetCellRenderer(Int32 rowIndex, Int32 colIndex) at Syncfusion.Windows.Forms.Grid.SelectCellsHitTestInfo..ctor(GridControlBase grid, MouseEventArgs e, IMouseController controller) at Syncfusion.Windows.Forms.Grid.GridSelectCellsMouseController.HitTest(MouseEventArgs e, IMouseController controller) at Syncfusion.Windows.Forms.MouseControllerDispatcher.HitTest(Point point, MouseButtons mouseButton, Int32 clicks, IMouseController& controller) at Syncfusion.Windows.Forms.MouseControllerDispatcher.ProcessMouseMove(MouseEventArgs e) at Syncfusion.Windows.Forms.ScrollControllMouseControllerDispatcher.ScrollControlMouseMoveHandled(Object sender, MouseEventArgs e) at Syncfusion.Windows.Forms.ScrollControl.OnScrollControlHandledMouseMove(MouseEventArgs e) at Syncfusion.Windows.Forms.ScrollControl.OnMouseMove(MouseEventArgs e) at Syncfusion.Windows.Forms.Grid.GridControlBase.OnMouseMove(MouseEventArgs e) at Syncfusion.Windows.Forms.Grid.GridControlBaseImp.OnMouseMove(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseMove(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg) at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.RunDialog(Form form) at System.Windows.Forms.Form.ShowDialog(IWin32Window owner) at System.Windows.Forms.Form.ShowDialog() What is the problem? Just for info : I use syncfusion 2.0.2.1, .NET 1.1, WinXp Thanks! bye syl


AD Administrator Syncfusion Team March 18, 2004 05:34 PM UTC

You may want to try the 2.0.3.0 version which is now available. Are you deleting the row by clicking the header and pressing the delete key? If you are programatically deleting the row, did you try what Reddy suggested above? Are you showing some kind of dialog when you do this? Are you using multiple threads? Can you see this problem in any of our samples so we can see it here?


SY Syl March 19, 2004 06:13 AM UTC

hi! Thanks for your answer i solve the problem.... in fact, the source code was not very clean! a lot of datatable update (add/del/edit) for nothing!!!! so I simplify the code, and now everything''s ok.... a+ syl

Loader.
Up arrow icon