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

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 06:26 PM

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.
Live Chat Icon For mobile
Up arrow icon