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.
Unfortunately, activation email could not send to your email. Please try again.

Tab Problem

Thread ID:

Created:

Updated:

Platform:

Replies:

22343 Dec 10,2004 12:59 AM Aug 11,2005 04:03 PM Windows Forms 16
loading
Tags: GridControl
Arun Prasath
Asked On December 10, 2004 12:59 AM

Hi Clay, When i am using tab to come out from particular cell i am getting following Error i can''t trap it . what will be the cause & how to rectify it. Error Msg: Do not move current position with this method this is very urgent thanx in advance Arun Prasath.

Administrator [Syncfusion]
Replied On December 10, 2004 02:49 AM

Here is an example of how this message might appear. The grid is in the process of moving the current cell (a ''MoveTo process''), and you try to call grid.CurrentCell.MoveTo to start a new MoveTo process of moving the currentcell from within an event like CurrentCellActivating that is part of the MoveTo process. There are some events that you should not call CurrentCell.MoveTo (or CuurentCell.Activate or CurrentCell.Deactivate, etc.). If you want to control where the Currentcell goes, you might try using the QueryNextCurrentCell event. Other things that might help in avoiding this problem is calling CurrentCell.Lock and Unloak around teh statement that is causing the error. You might also try handing CurrentCellMoved and do what you want there. By that time, the current cell moving process hav completed. If you can post a sample project showing this error, maybe we can suggest some way fo doing what you want.

Arun Prasath
Replied On December 13, 2004 01:14 AM

hi, I am using CurrentCellEditingComplete event to calculate some process. Regards Arun Prasath

Administrator [Syncfusion]
Replied On December 13, 2004 01:53 AM

CurrentCellEditingComplete is part of the CurrentCell move process. So, from in that event you cannot do anything that might change the currentcell without first locking the current cell. Did you try that?

Administrator [Syncfusion]
Replied On August 8, 2005 08:14 AM

I Also get the same exception, but i use moveto only in baritem.click event.

Christian Pogea
Replied On August 8, 2005 08:24 AM

this is one of the exceptions: System.InvalidOperationException: Do not move current position with this method! at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.SyncCurrentRecordState(Int32 pos) at Syncfusion.Windows.Forms.Grid.GridDataBoundGrid.OnCurrentCellActivated(EventArgs e) at Syncfusion.Windows.Forms.Grid.GridControlBase.RaiseCurrentCellActivated() at Syncfusion.Windows.Forms.Grid.GridCurrentCell.Activate(Int32 rowIndex, Int32 colIndex, GridSetCurrentCellOptions options) at Syncfusion.Windows.Forms.Grid.GridCurrentCell.MoveTo(Int32 rowIndex, Int32 colIndex, GridSetCurrentCellOptions options, Boolean discardChanges) at Syncfusion.Windows.Forms.Grid.GridCurrentCell.MoveTo(Int32 rowIndex, Int32 colIndex, GridSetCurrentCellOptions options) at Syncfusion.Windows.Forms.Grid.GridSelectCellsMouseController.MouseDown(MouseEventArgs e) at Syncfusion.Windows.Forms.MouseControllerDispatcher.ProcessMouseDown(MouseEventArgs e) at Syncfusion.Windows.Forms.ScrollControllMouseControllerDispatcher.ScrollControlBeforeMouseDown(Object sender, CancelMouseEventArgs e) at Syncfusion.Windows.Forms.ScrollControl.OnScrollControlMouseDown(CancelMouseEventArgs e) at Syncfusion.Windows.Forms.Grid.GridControlBase.OnScrollControlMouseDown(CancelMouseEventArgs e) at Syncfusion.Windows.Forms.ScrollControl.RaiseCancelMouseEvent(MouseEventArgs e, CancelMouseDelegate d) catched at Syncfusion.Windows.Forms.ScrollControl.RaiseCancelMouseEvent(MouseEventArgs e, CancelMouseDelegate d) in :line 0 this is the other one: System.InvalidOperationException: Do not move current position with this method! at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.SyncCurrentRecordState(Int32 pos) at Syncfusion.Windows.Forms.Grid.GridDataBoundGrid.OnCurrentCellActivated(EventArgs e) at Syncfusion.Windows.Forms.Grid.GridControlBase.RaiseCurrentCellActivated() at Syncfusion.Windows.Forms.Grid.GridCurrentCell.Activate(Int32 rowIndex, Int32 colIndex, GridSetCurrentCellOptions options) at Syncfusion.Windows.Forms.Grid.GridCurrentCell.MoveTo(Int32 rowIndex, Int32 colIndex, GridSetCurrentCellOptions options, Boolean discardChanges) at Syncfusion.Windows.Forms.Grid.GridCurrentCell.InternalMove(GridDirectionType direction, Int32 num, GridSetCurrentCellOptions options) at Syncfusion.Windows.Forms.Grid.GridSelectCellsMouseController.GridCurrentCellExternalMove(GridDirectionType direction, Int32 num, Boolean extendSelection) at Syncfusion.Windows.Forms.Grid.GridCurrentCell.Move(GridDirectionType direction, Int32 num, Boolean extendSelection, Boolean wrapCell) at Syncfusion.Windows.Forms.Grid.GridControlBase.OnKeyDown(KeyEventArgs e) at Syncfusion.Windows.Forms.Grid.GridDataBoundGrid.OnKeyDown(KeyEventArgs e) at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m) at Syncfusion.Windows.Forms.Grid.GridControlBase.ProcessKeyEventArgs(Message& m) at System.Windows.Forms.Control.ProcessKeyMessage(Message& m) at Syncfusion.Windows.Forms.Grid.GridControlBase.ProcessKeyMessage(Message& m) at System.Windows.Forms.Control.WmKeyChar(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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Administrator [Syncfusion]
Replied On August 8, 2005 08:33 AM

At the start of your click handler, try calling this.Validate(); //here this is the form or usercontrol

Christian Pogea
Replied On August 8, 2005 01:35 PM

i get it in another way, too. i have textboxes bound to a dataview and a griddataboundgrid also bound to the same dataview. i push my "new" button. it fires EndCurrentEdit() and AddNew(). i enter some text and push the "new" button. now my datarow moves to somewhere in the grid, because the grid is sorted. if i select the the new datarow in the grid, the wrong datarow is viewed in the textboxes and this exceptin is fired: System.InvalidOperationException: Do not move current position with this method! at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.SyncCurrentRecordState(Int32 pos) at Syncfusion.Windows.Forms.Grid.GridDataBoundGrid.OnCurrentCellActivated(EventArgs e) at Syncfusion.Windows.Forms.Grid.GridControlBase.RaiseCurrentCellActivated() at Syncfusion.Windows.Forms.Grid.GridCurrentCell.Activate(Int32 rowIndex, Int32 colIndex, GridSetCurrentCellOptions options) at Syncfusion.Windows.Forms.Grid.GridCurrentCell.MoveTo(Int32 rowIndex, Int32 colIndex, GridSetCurrentCellOptions options, Boolean discardChanges) at Syncfusion.Windows.Forms.Grid.GridCurrentCell.MoveTo(Int32 rowIndex, Int32 colIndex, GridSetCurrentCellOptions options) at Syncfusion.Windows.Forms.Grid.GridSelectCellsMouseController.MouseDown(MouseEventArgs e) at Syncfusion.Windows.Forms.MouseControllerDispatcher.ProcessMouseDown(MouseEventArgs e) at Syncfusion.Windows.Forms.ScrollControllMouseControllerDispatcher.ScrollControlBeforeMouseDown(Object sender, CancelMouseEventArgs e) at Syncfusion.Windows.Forms.ScrollControl.OnScrollControlMouseDown(CancelMouseEventArgs e) at Syncfusion.Windows.Forms.Grid.GridControlBase.OnScrollControlMouseDown(CancelMouseEventArgs e) at Syncfusion.Windows.Forms.ScrollControl.RaiseCancelMouseEvent(MouseEventArgs e, CancelMouseDelegate d) catched at Syncfusion.Windows.Forms.ScrollControl.RaiseCancelMouseEvent(MouseEventArgs e, CancelMouseDelegate d) in :line 0

Administrator [Syncfusion]
Replied On August 8, 2005 01:40 PM

In your new button, try calling grid.CurrentCell.EndEdit and grid.Binder.EndEdit before you call AddNew.

Christian Pogea
Replied On August 9, 2005 05:01 AM

that still doesn''t help

Administrator [Syncfusion]
Replied On August 9, 2005 07:18 AM

If you can upload a sample showing the problem, we can try to debug it here.

Christian Pogea
Replied On August 10, 2005 12:31 PM

push the "Neue Adresse" Button, enter "abcdefg" at "Name" and push the "Neue Adresse" Button. now try to select your new record. after 1 or 2 seconds you get the exception.

Christian Pogea
Replied On August 10, 2005 12:51 PM

here is the link. the forum update doesn''t work. http://aisnetwork.de/transfer/testGridBugAdressen.zip

Administrator [Syncfusion]
Replied On August 10, 2005 12:59 PM

I am getting a page cannot be displayed error when I try to hit your link. You can email the zip file to support@syncfusion.com and mention this thread in the subject line. Also post here that you sent it and I will get it.

Christian Pogea
Replied On August 11, 2005 04:11 AM

i send it to you right now.

Administrator [Syncfusion]
Replied On August 11, 2005 05:00 AM

What version are you using? I do not see the exception in the latest code base. I click the new button, type abcdef in the top textbox, click the new button again, and then click abcdef in the grid. This is when I should see the exceptions, correct?

Christian Pogea
Replied On August 11, 2005 04:03 PM

that''s right. i''m using 3.201.1.0

CONFIRMATION

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.

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.

;