The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator Syncfusion Team 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