Solved

Copy / Paste to /from a datawindow

Posted on 2004-04-01
3
1,640 Views
Last Modified: 2013-12-26
Hi

I have some functionality I'm trying to get to work. I allow a user to copy rows from a datawindow into the clipboard. Behind the scenes I copy the selected rows to a datastore.

The problem is if they then paste the values into Excel , change some values and try to paste the rows back into the visible datawindow, there is no change. Behind the scenes I try to do a Paste() into the datastore then row by row put them back into the visible datawindow but nothing seems to happen. The datawindow object is external.

any ideas would be appreciated.

cheers
0
Comment
Question by:maran_software
3 Comments
 
LVL 8

Accepted Solution

by:
Vikas_Dixit earned 125 total points
ID: 10733767
Try the following ( you may need to customize a bit) :

string ls_Data

ls_Data = Clipboard()

dw_1.ImportString(ls_Emp_Data)


Or use : dw_1.ImportClipboard().. see the variations that accept row/column range.

Also can you debug and see if your code is being executed at all ??
--VIkas
0
 
LVL 15

Expert Comment

by:namasi_navaretnam
ID: 10737088
Yes. You need to debug further. Check the retrun codes from ImportString, ImportClipboard functions. The data needs to be tab-delimited. Also post your code.
0
 

Author Comment

by:maran_software
ID: 10739075
Thanks your suggestion worked well! Thanks again.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now