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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Selective Copy/Pasting

Thread ID:





19809 Oct 4,2004 09:11 PM UTC Oct 4,2004 09:34 PM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On October 4, 2004 09:11 PM UTC

Hi, I am using a grid with ListBoxSelectionMode = SelectionMode.MultiExtended When copy and pasting, I only want the content of the current cell to be copied (not the whole selection), but I also want to put in something in the clipboard. I tried using: e.Handled = True e.Result = True gcAttributes.Model.CutPaste.CopyCellsToClipboard(e.RangeList, False) Clipboard.SetDataObject(sbText.ToString) my e.rangelist is just the That seems to copy the text, but when I''m pasting, the grid always puts the copied value in the first column. I think this is because I''m using the listbox selection mode. Is there a workaround this? Thanks.

Administrator [Syncfusion]
Replied On October 4, 2004 09:34 PM UTC

So, you want to control where things are pasted? If so, try handling the ClipboardPaste event and just explicitly set the current cell (calling grid.Selections.Clear and then using grid.CurrentCell.MoveTo to position the current cell where you want it to be). Then the default paste should start the paste where you set the current cell.


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