Copying data between datawindow controls


The task we need to do is to copy data from datawindow 1 to datawindow 2. This can be achieved by object property. But if there are many columns in a row, using object property for that would be time consuming and tedious task.

To accomplish the task with ease, no matter how many columns we have, there is a dedicated datawindow control function name RowsCopy().

In the button clicked event, type the syntax:
dw_1.RowsCopy(dw_1.GetRow(), &
dw_1.RowCount(), Primary!, dw_2, 1, Primary!)

Thats it. Now fill up the data in datawindow 1 and once you are done, click on the button-copy from dw_1 to dw_2.  

PS-: To learn more about RowsCopy() function, goto powerbuilder help.

No comments:

Post a Comment