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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Show Selected Range after Pasting Data

Thread ID:

Created:

Updated:

Platform:

Replies:

24747 Feb 9,2005 10:26 PM UTC Feb 9,2005 11:09 PM UTC WinForms 1
loading
Tags: GridControl
Jeff Lancaster
Asked On February 9, 2005 10:26 PM UTC

In a GDBG, if I copy data from a range of cells, click a new cell and then select paste, I would like to show the entire pasted range as selected (Currently, after pasting, only the first cell in the range is selected). How can I achieve this? Thanks, Jeff

Administrator [Syncfusion]
Replied On February 9, 2005 11:09 PM UTC

I think you need to handle the ClipboardPaste event. In that event you can call Model.CutPaste.Paste() to paste the contents from the clipboard. After that set e.Handled = true; bool inPaste = false; private void gridControl1_ClipboardPaste(object sender, GridCutPasteEventArgs e) { if (inPaste) return; inPaste = true; gridControl1.Model.CutPaste.Paste(); // now select the range of cells // I suggest calling Model.TextDataExchange.CalcBufferDimension(string psz, out int nRows, out int nCols) wheras psz should be the data from e.DataObject (buffer = iData.GetData(DataFormats.Text) as string) // then call Selections.SelectRange(range, true); e.Handled = true; inPaste = false; } Stefan >In a GDBG, if I copy data from a range of cells, click a new cell and then select paste, I would like to show the entire pasted range as selected (Currently, after pasting, only the first cell in the range is selected). How can I achieve this? > >Thanks, >Jeff

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.

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

;