3 Answers, 1 is accepted
RadGridView does support copy/paste functionality. Here you can find more information about this feature.
Best wishes,
Milan
the Telerik team
if the "SelectionUnit" property is set to "FullRow", is it possible to copy only the content of the cell who have the focus when the mouse is over it?
Thank's
When SelectionUnit is FullRow the grid will copy and paste whole rows. Contrary, when SelectionUnit is Cell the grid will paste and copy only selected cells. The pasting operation begin from the first selected unit.
Regarding your question if it possible to copy only the content of the cell who have the focus:
You could add an additional logic to the CopyingCellClipboardContent and PastingcellClipboardContent events of the GridView, so that you check what is the focused cell when copying and remember its DisplayIndex. Then on pasting you may paste the copied value to the cell of the row with this DisplayIndex.
If the name of your grid is clubsGrid, the code would look like:
private void clubsGrid_PastingCellClipboardContent(object sender, GridViewCellClipboardEventArgs e) { if (e.Cell.Column.DisplayIndex != currentCellDisplayIndex) { e.Cancel = true; } } private void clubsGrid_CopyingCellClipboardContent(object sender, GridViewCellClipboardEventArgs e) { if (clubsGrid.CurrentCellInfo.Column.DisplayIndex == e.Cell.Column.DisplayIndex) { currentCellDisplayIndex = e.Cell.Column.DisplayIndex; } }You may take a look at this forum post as well. Greetings,
Didie
the Telerik team