Repro-steps
Expected behavior
Observed behavior
Extra info
If the first column is of another type (like GridViewDecimalColumn) a DataError occurs (because "System.IO.MemoryStream" cannot be parces to a decimal).
Hi, Martin,
Indeed, the order of parsing the clipboard's content has been changed which is the reason behind the changed behavior. We are currently working on a solution which is expected to be released in the next official service pack. Meanwhile, feel free to cancel the Pasting event for the undesired Format.
Once again, please excuse us for the inconvenience caused.
Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hi Dess, thanks for your reaction. I am sorry, your solution almost correct.
This is because you've changed your order op using clipboard. CSV is going to be used first now (previously it was HTML) and the CSV pasting operation does not recognize CSV data inside a MemoryStream. So the CSV content should be cancelled.
Hi, Martin,
I confirm that it is an issue with RadGridView. That is why I have approved this bug report.
I have also updated your Telerik points.
Currently, the possible solution that I can suggest is to handle the Pasting event that RadGridView offers and cancel pasting other formats than text:
private void RadGridView1_Pasting(object sender, GridViewClipboardEventArgs e)
{
if (e.Format != "Text")
{
e.Cancel = true;
}
}Please excuse us for the inconvenience caused. We will do our best to introduce a fix in the upcoming service pack. Meanwhile feel free to us the suggested solution.
Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.