We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Copy and paste from Excel/Notepad in to dropdown cell

Thread ID:





59972 Apr 25,2007 02:34 PM UTC Apr 26,2007 01:05 PM UTC WinForms 1
Tags: GridControl
Philip Bishop
Asked On April 25, 2007 02:34 PM UTC

I'm having an issue copying from Excel/Notepad in to a grid that has a dropdown cell. The cell value can be either YES or NO. If they paste a lower case no from excel, I then catch that in the grid pastecelltext event and upper case it before it pastes it. I also catch this in our copy one to many clipboardpaste function. When I put a lower case no in notepad and copy it to one cell in the grid it doesn't go to my pastecelltext event. Is there a way I can catch this also and upper case it or just to make anything that goes in this cell automatically be uppercased by default? I've attached a sample of this.


Administrator [Syncfusion]
Replied On April 26, 2007 01:05 PM UTC

There is a CharacterCasing style property that you can set for TextBoxBase based cell controls that can force the case of a cell. But this will not affect the copy-paste process that you are using.

But there is a property (IgnoreCurrentCell) on the CutPaste event args that you can set so that pasting a single cell is handled the same as a multi-cell paste. This forces the PasteCellText event to be raised even for single cells.

Private Sub GC1_ClipboardPaste(ByVal sender As Object, ByVal e As GridCutPasteEventArgs) Handles GC1.ClipboardPaste

Dim blnHandled As Boolean
e.IgnoreCurrentCell = True
blnHandled = ClipboardPaste(GC1)
e.Handled = blnHandled

End Sub

Setting this property made your sample display NO even for a single cell copy/paste for me.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon