Hi:
Platform: Windows NT 4.0 , PB 5.0.03
I have 2 datawindows on a window. dw_master and dw_detail. The two datawindows are
linked. The detail datawindow allows for updates.
I have retrieval style of linkage between the two datawindows.
So far, So Good.
When the user makes changes to the detail datawindow and clicks on a new row in the
master, the changes are lost.
To take care of this problem, I have put some code in the rowfocuschanged event of the
master.
1. Override the ancestor so that notification is not sent to the linkage service.
2. This code checks to see if there are any changes in the detail datawindow, and if
there are any, it displays a messagebox to the user asking if they would like to save
the changes.
3. Call the ancestor script to send a notification to the linkage service.
The problem here is "THE MESSAGEBOX DOES NOT SHOW". It just beeps and the code
continues to execute resulting in NOTHING.
Can anyone shed some light here.
Thanks,
Sandeep
PS: I had read the following from the pfcguide web site.
----------------------------------------------------------------
### When I change rows my updates are lost. ###
- Contributed by Sharon Buntz
This is a drawback of using the Retrieval style of the Linkage service. And it is a
sticky problem to try to code around, but it can be done.
*** What is it :) ***
The problem is that there is no RowFocusChanging event in order to trap that the row's
focus is changing to test if you should ask the user if they would like to save their
changes.
One option is to simply switch to using the Filter style of the Linkage service. This
is a viable solution for cases when you are not forced into using the Retrieval style
because of very large
quantities of data that would need to be retrieved.
On the bright side, please note that in PowerBuilder 6.0, there will be a
RowFocusChanging event. And also, in PFC 6.0, this problem will be fixed as well,
using the new RowFocusChanging event.
----------------------------------------------------------------
> [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE: help pfcsig
> SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]