Uwe Grauer wrote: > Suppose i have a editform for adding a new detailrecord. > On my editform i display the parentrecord also. > What is the best way to handle the sql for my detailrecord for the > requery of the parentrecord when displaying the form? > I set up the bizobjs to have the linkinformation for parent, child. > So if i do a requery, i get a already existing detailrecord displayed. > Of cause i can then call new() on my detailbizobj and set the current > record to my new one. > Or would it be better to just set the sql to something like "where 1=0" > and then call new? When saving the new detailrecord i would have to > somehow change my sql back. > > Do you have a receipt on how to do things like this?
Typically, I have a edit page showing the master information, and one or more grids showing child records. When the user wants to add a new record to a child, my code does 'bizChild.new()', which also implicitly sets the child's current row number to the new record. Then, I'll launch a modal edit dialog for filling in the child fields. That's really all that needs to be done. When the master bizobj is saved, the child will get saved too. Instead of a modal edit dialog you could also set the grid columns to editable and just let the user edit the values in place, but you lose the control that true dTextBox's give you. -- pkm ~ http://paulmcnett.com _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
