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.
When the user does a ctrl-c, I want to copy an id field from the underlying datasource for that row. Both on a single cell or range.
Can I drill down to that information in the GridCutPasteEventArgs or do I need to attach to other events and track this separately?
How can accomplish this?
ADAdministrator Syncfusion Team February 14, 2004 07:22 PM UTC
One way you could possibly do this is to catch ClipboardCopy, add the information you want to the clipboard as a custom object, and then handle ClipboardPaste and retrieve your custom object and use it.
Here is a little sample.
DFDoug FinkeFebruary 15, 2004 03:46 PM UTC
Thanks Clay,
This looks good.
With the GridCutPasteEventArgs, can the row and col be determined? I need to retrieve information from the datasource to set in e.DataObject.SetData.
ADAdministrator Syncfusion Team February 15, 2004 06:34 PM UTC
In the copy event, you would need to get the currentcell from the grid if that is what you want (grid.CurrentCell.RowIndex, grid.CurrentCell.ColIndex).
Or if you want the active range. you would use
GridRangeInfoList ranges;
this.GridRangeInfoList.Selections.GetSelectedRanges(out ranges, true);
// ranges.ActiveRange // the active range