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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ClipboardCopy Event

Thread ID:

Created:

Updated:

Platform:

Replies:

10877 Feb 14,2004 04:09 PM UTC Feb 15,2004 06:34 PM UTC Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On February 14, 2004 04:09 PM UTC

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?

Administrator [Syncfusion]
Replied On 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.

Doug Finke
Replied On February 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.

Administrator [Syncfusion]
Replied On 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

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

;