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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid.GridModelCutPaste.Cut() throws an exception

Thread ID:





20654 Oct 22,2004 05:52 AM UTC Oct 22,2004 07:08 AM UTC WinForms 1
Tags: GridControl
Sassan Danesh
Asked On October 22, 2004 05:52 AM UTC

I have the following code associated to my Edit-> Cut menu: if (this.m_mainGridControl.Model.CutPaste.CanCut()) this.m_mainGridControl.Model.CutPaste.Cut(); However, I get the following exception if I select a range of cells and attempt to cut: System.InvalidOperationException: Rollback without BeginTrans at Syncfusion.Windows.Forms.Grid.GridModelCommandManager.Rollback() at Syncfusion.Windows.Forms.Grid.GridModelCutPaste.CutRange(GridRangeInfoList rangeList, Boolean clearStyle) at Syncfusion.Windows.Forms.Grid.GridModelCutPaste.Cut() at RebalancingGUI.Form1.mnuEditCut_Click(Object sender, EventArgs e) in c:\documents and settings\sassan danesh\my documents\visual studio projects\rebalancinggui\form1.cs:line 448 at System.Windows.Forms.MenuItem.OnClick(EventArgs e) at System.Windows.Forms.MenuItemData.Execute() at System.Windows.Forms.Command.Invoke() at System.Windows.Forms.Control.WmCommand(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)

Administrator [Syncfusion]
Replied On October 22, 2004 07:08 AM UTC

I do not see this problem with the GridPad sample is teh Quick Start samples. Do you? Looking at the source code, then only reason to get the RollBack call that I could see would be if a call to Copy fails or if a call to Model.ClearCells fails. Are you trying to cut readonly cells, for example? If this is what is causing the problem, then you can hanlde the ClipboardCut event, and check if any of the cells are readonly, and if so, set e.Handled = true and e.Result = false to avoid this exception. Or, in the event, you could change teh radonly status if you want to be able to cut readonly cells.


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

Live Chat Icon For mobile
Live Chat Icon