Fraser_Admin
asked on
PowerBuilder DW PFC
I have a 3 PFC datawindows on a page.
DW#1 is a master list.
DW#2 is the detail of the row selected from DW#1.
DW#3 is a list (comes from another table) based on the row selected from DW#1.
When the user clicks the save button the pfc takes care of updating any changes in DW#2.
The save button will also update any rows in DW#3 (two of the columns are updatable in this DW).
There is also a delete button. When the user clicks it, it deletes the row from DW#1 & DW#2. I presumed it would also delete the rows from DW#3 but it does not seem to work.
I tried using the RowsMove method to put them into the delete buffer first. This removes them visually from the DW#3 but it does not remove them from the underlying db table.
Am I missing something?
Here is a code snippet.
cb_delete.clicked() event
-------------------------- ---------
int li_rc, li_rowcount
li_rowcount = dw_3.rowcount()
li_rc=dw_3.RowsMove(1, li_rowcount, Primary!, dw_3, 1, Delete!)
call super::clicked
DW#1 is a master list.
DW#2 is the detail of the row selected from DW#1.
DW#3 is a list (comes from another table) based on the row selected from DW#1.
When the user clicks the save button the pfc takes care of updating any changes in DW#2.
The save button will also update any rows in DW#3 (two of the columns are updatable in this DW).
There is also a delete button. When the user clicks it, it deletes the row from DW#1 & DW#2. I presumed it would also delete the rows from DW#3 but it does not seem to work.
I tried using the RowsMove method to put them into the delete buffer first. This removes them visually from the DW#3 but it does not remove them from the underlying db table.
Am I missing something?
Here is a code snippet.
cb_delete.clicked() event
--------------------------
int li_rc, li_rowcount
li_rowcount = dw_3.rowcount()
li_rc=dw_3.RowsMove(1, li_rowcount, Primary!, dw_3, 1, Delete!)
call super::clicked
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I had to use a work around to get this work. There was no response to the question at that point.
Can you please post the code in the ancestor of cb_delete button (invoked by super::clicked)?
I doubt it may be updating only DW1 and 2.
Thanks,
Harish