NetTalk Central

Author Topic: Refresh container form after embedded browse deletion  (Read 2882 times)

markster

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Refresh container form after embedded browse deletion
« on: May 14, 2013, 09:18:51 AM »
I have a form ('Master Form') that I am using in wizard mode to update an invoice file. The final tab has an embedded browse in it for invoice items with invoice total fields below. When I delete an invoice item, I am not using the standard Delete button, but instead I call my own deletion confirmation procedure ('Delete Form').

If I call the Delete Form in non-popup mode, after the deletion the Master Form receives focus back and I can then flag it to redisplay the revised invoice total fields on the Master Form.

If I call the Delete Form in popup mode, after the deletion the embedded browse receives focus back, NOT the Master Form, so I have no way to update the invoice total fields.

Is there any code I can place in the embedded browse so that when it receives focus back, it triggers a reload of the Master Form?

Thanks,

Mark

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Refresh container form after embedded browse deletion
« Reply #1 on: May 14, 2013, 10:12:28 PM »
>> I am not using the standard Delete button, but instead I call my own deletion confirmation procedure ('Delete Form').

Given the custom nature of what you are doing, an example would definitely be useful to duplicate the effect.

cheers
Bruce

markster

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: Refresh container form after embedded browse deletion
« Reply #2 on: May 26, 2013, 10:50:01 AM »
I'll try to put an example together from an example app.

Mark

markster

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: Refresh container form after embedded browse deletion
« Reply #3 on: May 27, 2013, 10:26:41 AM »
Here's an example file. I took example 2 and then pulled in the invoice/line item stuff from the Invoices sample app. Compile the program. When you start it, click on the Invoices menu item. Select any invoice and click on Update to bring up the Invoice form. You'll see two total fields at the bottom of the form that I've added.

Now if you click to Change any LineItem, it will display the LineItem form and you can edit the quantity/price, etc. When you save it you'll see that my total fields have been updated--that's because the UpdateInvoice form is redisplayed and I've added the CalcTotal routine to the GotFocusBack embed. This is as it should be.

However, if you click to Delete any LineItem, the LineItem form is not displayed, only the delete warning message, so that when the deletion is accepted, the UpdateInvoice form is never redisplayed. Instead the GotFocusBack is activated in the BrowseLineItem procedure. I need to get some kind of flag kicked back to the UpdateInvoice form so that it's redisplayed in the case of a LineItem deletion.

Mark

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Refresh container form after embedded browse deletion
« Reply #4 on: July 24, 2013, 02:09:09 AM »
I think it's sorted now Mark.

cheers
Bruce