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

Client-side copy includes hidden columns

1 Answer 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
dave
Top achievements
Rank 1
dave asked on 06 Sep 2011, 06:11 PM
I'm using a RadGrid to display rows where some of the columns are hidden by setting column.Display = false.  That's working fine.  The hidden columns contain data that is used in client-side JavaScript.  Again, that's working fine.

Some users drag over the displayed text and copy it (using ctrl-C) into another application.  If they drag over a single field, all is good.  However, when they drag over multiple fields that 'include' a hidden column, the hidden column's value is included as part of the copied text.  The user might drag over fields from a single row, or might drag over multiple rows.

Is there a way to prevent including the hidden column in the copied text while still having the value available to client JavaScript? (ie, setting Visible = false on the server is not really an option). 

Thanks,
Dave

1 Answer, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 12 Sep 2011, 11:27 AM
Hello Dave,

The cause of the described issue is that older browsers include the content of HTML elements with display:none to the text copied to the clipboard.
Please examine the following resources for additional information:
“display:none” content copied to clipboard, visible when pasted
JS: making invisible text (display:none) non-selectable

I hope this helps.

Kind regards,
Mira
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Grid
Asked by
dave
Top achievements
Rank 1
Answers by
Mira
Telerik team
Share this question
or