The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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)
ADAdministrator Syncfusion Team 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.