Exception during Copy operation

I have users getting an exception when the select a few rows in a databound grid control. The rows can have a very large volume of data on them. I am guessing the copy buffer can''t hold all the data. But I don''t think it should throw an exception. Is there a workaround to this?

1 Reply

AD Administrator Syncfusion Team December 9, 2004 11:26 PM UTC

You can handle the grid.Model.ClipboardCopy event and handle the copy yourself inside a try-Catch block, and handle the exception. maybe something like:
private void gridControl1_ClipboardCopy(object sender, GridCutPasteEventArgs e)
{
	try
	{
		GridRangeInfoList list = new GridRangeInfoList();
		list.Add(this.gridControl1.CurrentCell.RangeInfo);
		this.gridControl1.CutPaste.CopyCellsToClipboard(list, true);
		e.Handled = true;
		e.Result = true;
	}
	catch
	{
	}
}

Loader.
Up arrow icon