Hi Bill,
I'm assuming version 6.0B.
I think the new record isn't showing up in the grid because the grid itself needs to be refreshed.
First of all, try to ensure that your programatic addition of a record works as if the ADD button had been pressed (see cmdAdd.Click method for the details on what happens after a user ads a record via edit-form) but without calling the editform.
If this doesn't work then make the following modification to the framework:
Modify cListObjEdit's SetButtonEnabledStatus as follows:
ELSE
This.CListObj1.grdList.Refresh()
This.CListObj1.grdList.Enabled = .T.
This.cmdDelete.Enabled = .T.
This.cmdEdit.Enabled = .T.
ENDIF
This should work.
Alex
>I have a page on a pageframe which includes clistobjedit. I have a different bizobj on the page which is linked as stated in the manual. The main view has 'this.addviewparameter('vp_studentiid','v_student.iid')' in the postinithook. The bizobj is set to nquerytype = 2. Everything works OK.
>
>There are times, however, that I want to programatically(sp)add a record to the view. I select the view, call this.new(), enter the data, call this.save() and everything updates correctly.
>
>When I look at the page the new record is not displayed, I believe because the view has not been requeried. If I select the view and try to requery it the dialog appears looking for the value to vp_studentiid. ???
>
>Is there a way to requery the view? If I leave the screen and return the new record appears in its place with all other records.
>
>TIA
>
>Regards,
>
>Bill
Low-carb diet not working? Try the Low-food diet instead!