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

Can cut work like Excel?

Thread ID:





11915 Mar 18,2004 12:38 AM UTC Mar 18,2004 11:00 AM UTC WinForms 1
Tags: GridControl
Asked On March 18, 2004 12:38 AM UTC

In Excel, the source text disappear until user paste it. In Syncfusion, the source text disappear immediately when the cut it. How can we make Syncfusion''s Cut working like Excel? Thanks.

Administrator [Syncfusion]
Replied On March 18, 2004 11:00 AM UTC

This will only work if you cut and paste into the same grid (but I think excel has the same behavior). You can catch the grid''s ClipboardCut event, and copy the selections to the clipboard, save the ranges, and then set e.handled so the grid does not try to do its own cutting later. Then you can catch the grid.Model''s ClipboardPasted event, and there clear the saved ranges. //subscribe to the events this.grid.Model.ClipboardPasted += new GridCutPasteEventHandler(grid_ClipboardPasted); this.grid.ClipboardCut += new GridCutPasteEventHandler(grid_ClipboardCut);
private GridRangeInfoList cutRangeList = null;
private void grid_ClipboardCut(object sender, Syncfusion.Windows.Forms.Grid.GridCutPasteEventArgs e)
	GridRangeInfoList rangeList = this.grid.Selections.Ranges.Clone();
		cutRangeList = rangeList.Clone();
		e.Handled = true;
		e.Result = true;
private void grid_ClipboardPasted(object sender, Syncfusion.Windows.Forms.Grid.GridCutPasteEventArgs e)
	if(cutRangeList != null && cutRangeList.Count > 0)
		this.grid.ClearCells(cutRangeList, false);
	cutRangeList = null;


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