This is a migrated thread and some comments may be shown as answers.

Copy/Paste

4 Answers 385 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 09 Feb 2010, 02:23 PM
Hi,

I like to add some copy/paste functionality to the grid.
In the grid contextmenu, I need a applicationcommands.copy and a applicationcommands.paste.
The problem is that the copy command is handled by the grid (for clipboard copy I suppose) and the copy canexecute is not fired in my program. Do you have a solution for this?

Thanks in advance,
Thomas.

4 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 12 Feb 2010, 11:49 AM
Hello Thomas,

Can you please describe the behavior expected  from RadGridView ( on the Copy command ) and I will try to prepare a working example.

Sincerely yours,
Pavel Pavlov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Thomas
Top achievements
Rank 1
answered on 12 Feb 2010, 12:10 PM
Hi,
 
With the copy command (Ctrl+C) I like to store a reference to the datacontext of the selected row.
With the paste command (Ctrl+V) I like to add a new record to the itemssource of the gridview where the values of the new record are the same as that of the stored datacontext.

Thanks in advance,
Thomas.

0
Pavel Pavlov
Telerik team
answered on 17 Feb 2010, 11:31 AM
Hello Thomas,

Please use the attached sample as a starting point.

Greetings,
Pavel Pavlov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Thomas
Top achievements
Rank 1
answered on 17 Feb 2010, 12:32 PM
Hello,

Thank you very much for your example. Unfortunately, this won't work in my case.
Because the user can hide and reorder the columns, the meaning of the clipboard data is not something unique.
It would be best if I could write my own copy logic in the Executed handler.

Thanks again,
Thomas.

Tags
GridView
Asked by
Thomas
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Thomas
Top achievements
Rank 1
Share this question
or