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

Copy only visible columns in radgridview

3 Answers 116 Views
GridView
This is a migrated thread and some comments may be shown as answers.
lucerias
Top achievements
Rank 1
lucerias asked on 06 Jan 2012, 03:21 AM
Hi, may i know how to copy only visible columns of radgridview to clipboard so that it can be pasted to Excel or vice versa?
Or i must modify the item source to remove those columns that are not needed for display?

I am using Silverlight 4.0.

Thank you very much.

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 06 Jan 2012, 07:51 AM
Hello Lucerias,

Actually, copying a particular item will copy only the values of the visible columns. Nevertheless, if you want to perform any custom action during this process, you can handle Copying/ CopyingCellClipboardContent events. You can find more information in our online documentation

Kind regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
lucerias
Top achievements
Rank 1
answered on 06 Jan 2012, 08:49 AM
Hi,

That is not my case now, i have binded observable collection to radgridview.
The observable collection contains id, name and age.
They are displayed as three columns in radgridview.

I have set id column visibility to false so that it will not be shown in radgridview.
However, when i peform copy and paste, it actually copies the hidden column value to excel spreadsheet, which means id, name and age all are copied over.

Please help on this.

Thanks.

0
Maya
Telerik team
answered on 06 Jan 2012, 10:43 AM
Hello,

I have tested the case and everything works as expected on my side. Please take a look at this small video for a reference. 
 

All the best,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
lucerias
Top achievements
Rank 1
Answers by
Maya
Telerik team
lucerias
Top achievements
Rank 1
Share this question
or