Hi Community,
In this application, the users have a problem cutting and pasting from Excel.
The paste operation is failing to paste data into "Datawindow Single Line Edit" fields.
Afaict, it is because the clipboard of the Excel cell contains a CRLF data, and the single line edit field is rejecting the paste operation.
These fields are specifically string data types, in data windows, single line (no vertical scrollbars), the edit style is "Edit" (not edit mask).
That is...
1. If you cut the “WHOLE CELL” from Excel, and paste into a "Datawindow Single Line Edit" field, then nothing happens, and a rejection chime sounds.
2. If you cut the value (by selecting the text within the cell) from Excel, and paste into a "Datawindow Single Line Edit" field, then the data will paste.
What is the best way to solve this problem - that is - so the users can cut and paste easily from excel into these data fields?
Cheers, Peter.
P.S.
- So far i've looked at hooking into the pfc_u_dw.pfc_paste event, and replacing the clipboard with trimmed text. Also capturing control-v with a hidden menu item and routing to pfc_paste. Is there a better way..?
- The users have come over from the dotnet 12.5 version of the application, and were accustomed to pasting whole cells from Excel, it saves them a click or two, which they like .
- Note, if you paste a Cell that has content that is longer than the limit, the a truncated paste will succeed as the CRLF are truncated off.