1

I'm working in RadGridView where i need to copy the cell content.

As part of the application functionality, i want the Grid SelectionUnit to always be of type Row. In addition to this, we also want to expose a mechanism where the user can select a cell value for copy to clipboard.

Is there a way to do this? For example, double clicking a cell copies the cell value where as single click always selects the row.

A Coder
  • 3,039
  • 7
  • 58
  • 129

1 Answers1

1

Try this,

Not a perfect one, but for your requirement it suits.

void testGridView_CopyingCellClipboardContent(object sender, GridViewCellClipboardEventArgs e)
{
    if (grdName.CurrentCell != null && grdName.CurrentCell.Column == e.Cell.Column)
    {
        e.Cancel = false;
    }
    else
        e.Cancel = true;
}

Where replace your GridView name with "grdName".

John
  • 69
  • 1
  • 7