Paul McNett wrote:
> Uwe Grauer wrote:
>> From my grid of childrecords i call my editform for editing a
>> detailrecord. But on this editform i want to display the parent
>> information as non editable. When requerying for the parent my detail
> 
> I don't understand why you have to "requery for the parent". Isn't your 
> child bizobj already sync'd up with the parent bizobj? In that case, you 
> just set the DataSource and DataField of that readonly textbox to the 
> parent bizobj's field. This works for me, I do it all the time.
>

I'm using a new bizobj for my editform. In order to get the record for
my parent, i have to requery. I then call new on the childrecord.

>> editboxes get filled with a already stored detail record.
>> When i then call new on the detailbizobj it doesn't set the current row
>> number to the new record which is the problem i'm having here.
>> Is this because the detailrecord isn't on a grid?
> 
> Calling biz.new() will implicitly set the row number to that record. If 
> that isn't happening, something is wrong. Could it be you just need a 
> form.update() or form.refresh()?
> 

No, i used form.refresh() after the childbiz.new() call, but this didn't
help.
Here is my editform.onActivate code:
def onActivate(self, evt):
        # EditEnum
        if not self.p_isactivated:
                self.p_isactivated = True
                self.PrimaryBizobj.addWhere("iid = %d" % self.p_etypiid)
                if self.p_newrecmode:
                        self.Caption = "%s (new record mode)" % self.CaptionStd
                        self.requery()
                        biz = self.getBizobj(dataSource="ENUM")
                        biz.new()
                        self.refresh()
                else:
                        self.Caption = "%s (show/edit record mode)" % 
self.CaptionStd
                        self.getBizobj(dataSource="ENUM").addWhere("iid = %d" % 
self.p_enumiid)
                        self.requery()

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to