On Mon, Jul 13, 2009 at 12:25 PM, Uwe
Grauer<[email protected]> wrote:
> Miguel Lopes wrote:
>> I open a form to create some new records, and when I close it I'm not
>> able to update the grid in the MainForm.
>> The grid in the main form is a child of the MainForm.PrimaryBizobj.
>>
>> I've tried update in the MainForm's caller method with:
>>     * MainForm.update()
>>     * MainForm.update(interval=0)
>>     * MainForm.gdOpptyContacts.update()
>>
>> And in the closing method for the creation form, using:
>>     * self.Form.update()
>>     * self.Form.update(interval=0)
>>     * self.Form.gdOpptyContacts.update()
>>
>>
>> The best results I get is a new row filed with "< None >". But the
>> record was effectively created, and if I move out and into the current
>> record in the MainForm the grid is update and reflects all the
>> changes.
>
> dForm.update() updates the form controls with the current values from
> the bizobj. Read the docs!
> What you want is dForm.requery().
>
> Uwe
>
Txs for the tip Uwe.
Actually I'm aware of dForm.requery(), but was trying to avoid it.
Since I just changed the bizobj locally, I expected that the change
would be reflected with update - it makes sense to avoid requery() and
it's requerying the db, when the addition is local.
I also neglected to call requery in the creation form. I made the
mistake of only calling it in the caller method that instantiates the
form (forget about callAfter!). Thus, blinded to requery!

Txs again,
Miguel


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to