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

Selective Copy/Pasting

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.

1 Reply

AD Administrator Syncfusion Team October 4, 2004 05:34 PM

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.

Loader.
Live Chat Icon For mobile
Up arrow icon