Wisej Clipboard copy to local PC

0
0

I have created a WiseJ version of a web program displaying text in a DataGridView (2 columns).

I would like to be able to click a cell text and have that text copied to the clipboard and be made available to the local PC to paste into a document, notepad or anywhere copy/paste is allowed.

I have tried all of the suggestions on this website to no avail.  Obviously I am missing something.

Can anyone advise or even provide a working sample in VB.NET or C#?

my last attempt:

Private sub dgvSource_CellClick(sender As Object, e As Wisej.Web.DataGridViewCellEventArgs)  Handles dgvSource.CellClick
If e.RowIndex >= 0 AndAlso e.ColumnIndex > 1 Then
Dim selectedCellText As String = dgvSource(e.ColumnIndex, e.RowIndex).Value.ToString()
Clipboard.SetText(selectedCellText)
End If
End Sub

My DataGridView has CopyToClient set in the ClipboardCopyMode.

  • You must to post comments
0
0

Hi Frank and Rusty,

ClientClipboard solves my copy-problems. Great tool and helpful example.

For one function I would be glad if it would be available: ClientClipboard.Clear()

 

Best regards

Ottilie

  • Julie(ITG)
    We’ve logged this as an enhancement request. For now, you can clear the clipboard text by doing ClientClipboard.WriteText(“”);
  • Ottilie Steinhauer
    Thanks Julie for the info. Will be glad to hear about future abilities.
  • You must to post comments
0
0

You are a genius!  Thank you for your fast response.  It worked perfectly!

  • You must to post comments
0
0

Hi Rusty,

this can be achieved by using the Wisej.NET ClientClipboard extension.
Please find attached a sample that you can adapt to your needs.

Best regards
Frank

Attachment
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.