I have set the following properties in the gridview excel copy related functionalities.
SelectionMode="Extended"
ClipboardCopyMode="All"
ClipboardPasteMode="Default"
SelectionUnit="Cell"
My requirement:
I have field in the grid that can be nullable. The CellEditTemple of the field has a dropdown.
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding ActTypeDesc, Mode=TwoWay}"
Header
=
"ACTTYPE"
Width
=
"75"
Tag
=
"ActTypeDesc"
UniqueName
=
"ActTypeDesc"
>
<
telerik:GridViewDataColumn.CellEditTemplate
>
<
DataTemplate
>
<
telerik:RadComboBox
SelectionChanged
=
"radCmbActType_SelectionChanged"
Loaded
=
"radCmbActType_Loaded"
Tag
=
"ActTypeDesc"
Name
=
"radCmbActType"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellEditTemplate
>
</
telerik:GridViewDataColumn
>
Now when I try to paste a non-empty value onto the grid cell I can see that the PastingCellClipboardContent event gets fired.
But when I try to copy a empty cell from the excel and paste onto the grid cell the PastingCellClipboardContent even is not fired.
I wanted to set selected item of the dropdown in this case to null, but the PastingCellClipboardContent doesn;t seem to fire when the cell copied is empty.
I even tried to set the
ClipboardPasteMode
property to "OverwriteWithEmptyValues" but even this did not seem to help me.If possible, could you please help me with my requirement.
Many thanks!
Regards,
Mausami
8 Answers, 1 is accepted
This is expected behavior .If you do not have content to paste - the event will not be fired.
As a workaround I may suggest to explicitly handle the System.Windows.Input.ApplicationCommands.Paste command and this way perform your custom action.
Regards,
Pavel Pavlov
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Many thanks !
Regards,
Mausami

Integer |
Color |
Boolean |
1 |
|
True |

On the RadGridView: ClipboardPasteMode="Cells,SkipHiddenColumns,OverwriteWithEmptyValues"

example:
1
2
3
4
5
we copy the value 1 and select the cells containing values 2 - 5 and execute a paste... the value 1 would be applied to the cells currently containing the values 2 - 5. This will be huge for my application if support is planned for this.

I am using telerik grid for one of massive data entry project.I would like to copy a two or threecell value and paste it over a bunch of other cell. Is this functionality available out of the box?
this works fine for me if i select a single cell and cop it on buch of cells but if i selects two or three cell and paste it into buch of cell it;s not work for me.I am using the latest telerik version
Please provide some solution.

Hello Amit,
Supposed the cells are numbered as given below
1
2
3
4
5
6
7
8
9
10
I select the cells 1,2,3 and copy (Ctrl + C). Then even if I select cells 5,6,7,8,9,10 as the destination cells and paste (Ctrl + V) , the data will get pasted only in cells 5, 6, 7 respectively, since data was copied from only three cells.
Regards,
Mausami

Below is my scenario:-
1 2 3 4
5 6 7 8
9 10 11 12
There are three row so if i selected two cells of first row(1,2) and want to copy in place of (5,6) and (9,10) in single hit it's not working it;s just paste in place of (5,6) but i need excel type functionality.. this thing is working for single cell like if i select only 2 and paste it in place of (5,6,9,10) then it's works fine.
But for more than one cell it's not working.
Please suggest some solution.
Thanks,
Amit