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();
if(this.grid.CutPaste.CopyTextToClipboard(rangeList))
{
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;
}