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

Copy & Paste from RadGridView

11 Answers 517 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Suman Rao
Top achievements
Rank 1
Suman Rao asked on 09 Aug 2010, 08:45 AM
Hi All,

 Copy & Paste

 

Is there any way to copy and paste like multiple rows and paste directly into excel as opposed to having to use the Export opion in RadGridView
As the RadGridView Export always insists on the user saving the file first as this can be sometime quite cumbersome?

Thanks and regards,
Suman

11 Answers, 1 is accepted

Sort by
0
Yavor Georgiev
Telerik team
answered on 09 Aug 2010, 09:00 AM
Hello Suman Rao,

 All you need to do is set the SelectionMode property on RadGridView to Multiple or Extended, in order to achieve multiple row selectio, press CTRL + C and that's all. RadGridView has robust Clipboard integration, which allows you to copy and/or paste cell or entire rows.

Best wishes,
Yavor Georgiev
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
Suman Rao
Top achievements
Rank 1
answered on 10 Aug 2010, 07:50 AM
Thanks Yavor,

I was able to copy and paste the entire row, but I am unable to select, copy the GridHeader
How do we copy the Grid Header (Entire header row) ?

Thanks and regards,
Suman
0
Yavor Georgiev
Telerik team
answered on 10 Aug 2010, 06:41 PM
Hello Suman Rao,

 You need to include the GridViewClipboardCopyMode.Header flag in the ClipboardCopyMode property of RadGridView. You can set it like so "<telerik:RadGridView .... ClipboardCopyMode="Cells,Header"/>" in XAML or like so "radGridView1.ClipboardCopyMode = GridViewClipboardCopyMode.Cells | GridViewClibpoardCopyMode.Header;" in code-behind.

When this flag is present, RadGridView will also include the column header for any selected cells.

All the best,
Yavor Georgiev
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
Joseph Gershgorin
Top achievements
Rank 1
answered on 23 Oct 2010, 03:54 AM
Is it possible to initiate a copy via a method on the RadGridView control instead of ctrl-c/ctrl-v. I want to have a context menu for copy / paste on a RadGridView.
0
Yavor Georgiev
Telerik team
answered on 25 Oct 2010, 10:55 AM
Hello Joseph Gershgorin,

 You can use RadGridViewCommands.Copy and RadGridViewCommands.Paste, which are routed UI commands that we ship with RadGridView. You can see an example of the different RadGridViewCommands being used here.

Best wishes,
Yavor Georgiev
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
Marc Roussel
Top achievements
Rank 2
answered on 06 Jun 2013, 10:33 PM
I'm in need of this but I don't understand based on what I saw on your demo to implement it using the ContextMenu so the user can just copy an existing row which will produce a duplicate of this row.
0
Maya
Telerik team
answered on 07 Jun 2013, 07:13 AM
Hello Mark,

Could you clarify what exactly you want to accomplish ? Do you want to copy a row and paste it to multiple other selected rows ? Or you want to insert a new row on pasting ?   

Regards,
Maya
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Marc Roussel
Top achievements
Rank 2
answered on 07 Jun 2013, 11:13 AM
It's ok I found my solution.

I just do a deep clone of DataContext object for the selected row and add the copy to the collection and issue a Grid.Rebind and do a SelectedItem = to the new object also a CurrentItem = to the new object and it works fine
0
Maya
Telerik team
answered on 07 Jun 2013, 11:17 AM
Hi Marc,

Ok, great. Let me know if you need further assistance. 


Regards,
Maya
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Carole
Top achievements
Rank 1
answered on 02 Sep 2018, 09:41 AM
hi all,

i'm not sure if my problem has a solution on these forums which i didn't get to see . I actually made a lot of searches before posting this :

i am using telerik winforms 2013 q2 radgridview and trying to paste texts copied from MS word files in arabic language . if the pasted text exceeds a certain number of caracters, my form ends up hanging forever.

i tried to do so with texts from word ,excel or from the web even in arabic ...it's all working like a charm !  (till now i supposed the problem is only with my text )

I,finally ,tried doing something with the code i'm not sure if it's helpful :

on keydown event, after testing if the buttons clicked are ctrl+v , i used setdata() function to change the data format to text instead of unicode text . Surprisingly, it pasted an incomprehensible text (eventually its equivalente in another language) and my form didn't hang .

Could you please help me out? i'm running out of solutions . 

Thanks in advance

0
Stefan
Telerik team
answered on 05 Sep 2018, 02:23 PM
Hi Carole,

This forum thread is for the UI for Silverlight RadGridView components. Please note, that we are constantly trying to keep our support communication consistent. So, since you are using the UI for Winforms RadGridView, I would kindly ask you to post your inquiry in the relevant forum section.

Thank you in advance for your understanding.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
Suman Rao
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
Suman Rao
Top achievements
Rank 1
Joseph Gershgorin
Top achievements
Rank 1
Marc Roussel
Top achievements
Rank 2
Maya
Telerik team
Carole
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or