I have two windows and each have one data window. I just want to double click on first window's data window to get the second window's data window and want to add the selected row from the second window's data window to the same fields of first. How can I make it possible?
0
votes
2 Answers
1
votes
0
votes
Many assumptions are being made but in a nutshell:
//in the doubleclick event on window1.dw_1
long ll_row, ll_newrow
//get selected row on other window
ll_row = window2.dw_2.getselectedrow(0)
IF ll_row > 0 THEN
ll_newrow = dw_1.insertrow(0)
dw_1.setitem(ll_newrow, 'colname1', window2.dw_2.getitemnumber(ll_row, 'colname1')
dw_1.setitem(ll_newrow, 'colname2', window2.dw_2.getitemstring(ll_row, 'colname2')
// and so on
END IF
There are many other ways to achieve the same thing based on what you are trying to do after you have copied the row from one place to another.