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.
Unfortunately, activation email could not send to your email. Please try again.

Copy and paste from Excel/Notepad in to dropdown cell

Thread ID:

Created:

Updated:

Platform:

Replies:

59972 Apr 25,2007 10:34 AM Apr 26,2007 09:05 AM Windows Forms 1
loading
Tags: GridControl
Philip Bishop
Asked On April 25, 2007 10:34 AM

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.

CopyPasteDropDown.zip

Administrator [Syncfusion]
Replied On April 26, 2007 09:05 AM

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
GC1.BeginUpdate()
e.IgnoreCurrentCell = True
blnHandled = ClipboardPaste(GC1)
GC1.EndUpdate()
GC1.Refresh()
e.Handled = blnHandled

End Sub


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

CONFIRMATION

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.

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.

;