To reproduce: run the attached sample project:
1. Clear the value in one of the cells.
2. Select the empty cell and press Ctrl+C to copy the empty cell. You will encounter the error coming from the GetFormattedCellValue method.
Workaround: handle the RadGridView.Copying event
private void RadGridView1_Copying(object sender, GridViewClipboardEventArgs e)
{
if (this.radGridView1.SelectionMode == GridViewSelectionMode.FullRowSelect)
{
foreach (var row in this.radGridView1.SelectedRows)
{
foreach (var cell in row.Cells)
{
GridViewCellInfo cellInfo = cell as GridViewCellInfo;
if (cellInfo != null && cellInfo.Value == null)
{
cellInfo.Value = "";
}
}
}
}
else
{
foreach (var cell in this.radGridView1.SelectedCells)
{
if (cell.Value == null)
{
cell.Value = "";
}
}
}
}