Duplicated
Last Updated: 11 Jul 2023 14:04 by ADMIN
n/a
Created on: 06 Jun 2023 10:34
Category: GridView
Type: Bug Report
0
wpf gridview copy CopyingCellClipboardContent cancel issue

I have a GridView, with  ClipboardCopyMode set to "Cells, Header" and defined event CopyingCellClipboardContent :

private void RadGridView1_CopyingCellClipboardContent(object sender, GridViewCellClipboardEventArgs e)
{
// _excludedcolumns = columns excluded from copy operation set in logic before
if (_excludedcolumns.Contains(e.Cell.Column))
{
e.Cancel = true;
}
}

Header cells are empty, not skipped like ordinary cells.

Regards
Janez

 

Duplicated
This item is a duplicate of an already existing item. You can find the original item here:
3 comments
ADMIN
Martin Ivanov
Posted on: 20 Jun 2023 08:27

Hello Janez,

Thank you for the additional information.

I can confirm that that this is an issue in the copy process of RadGridView. That is why I have logged it in our feedback portal where you can track its status. You can also find your Telerik points updated.

To work this around, you can manually replace the content in the clipboard when the Copied event of RadGridView is raised. You can find this idea shown in the attached project. Can you try it and let me know if it helps?

Regards,
Martin Ivanov
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.

Attached Files:
n/a
Posted on: 13 Jun 2023 09:49

2023-06-13_11h28_40.png is a print screen of selection in GridView. Columns Urejanje and Stran are excluded from copy.
Gridview ClipboardCopyMode is set to "Cells, Header", SelectionUnit to "Cell" and SelectionMode to "Extended"

I selected marked range of cells and press Ctrl-C

Then I opened Excel, made new workbook and press Ctrl-V

2023-06-13_11h42_49.png is part of Excel, where I pasted data. You can see column B and C without headers, and column D has header that should be on column B. Proper headers for columns C and D are missing.

I hope, I explained problem

Janez

ADMIN
Martin Ivanov
Posted on: 13 Jun 2023 08:06

Hello Janez,

Can you tell me what do you mean by that header cells are not skipped? Do you mean that all column headers copying is canceled and there is an empty row in the clipboard data? Or that you have only some of the header cells selected that should be skipped, but others should be left in the clipboard? Would it be possible to record a video or describe the steps to recreate the issue and to show end result in the clipboard?

Regards,
Martin Ivanov
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.