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

Handing Paste

1 Answer 85 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Scott Michetti
Top achievements
Rank 1
Iron
Scott Michetti asked on 02 Apr 2014, 06:02 PM
Hello, I'm trying to validate pasting into the grid. I'm using PastingCellClipboardContent because it lets me know which cell is being pasted into and the value, but I can't cancel at this point. Even if I set the e.Handled = true, the value is in the cell. The Pasting event will cancel, but that event doesn't have a GridViewCellInfo object like PastingCellClipboardContent does, so I don't know which cell(s) are being pasted and their values. Is there a way to handle this so I can validate the input and cancel or allow each value for each cell?

Thanks,
Scott

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 07 Apr 2014, 11:54 AM
Hi Scott,

You can set e.Cancel = true;
when the PastingCellClipboardContent is raised and you would like to cancel the paste.

I hope this helps.

Regards,
Didie
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
Scott Michetti
Top achievements
Rank 1
Iron
Answers by
Dimitrina
Telerik team
Share this question
or