Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Requery - repost
Message
 
To
15/10/2001 14:18:59
Bill Breay
Custom Business Software
Arvada, Colorado, United States
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00568688
Message ID:
00568771
Views:
15
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
    *-------------------------------------------
    *--- Enable Delete, Edit buttons
    *--- (The parent method enables the grid)
    *-------------------------------------------
    * AW: Not really. There is no dodefault() anywhere in this method!
    
    * Added by AW
    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!
Previous
Reply
Map
View

Click here to load this message in the networking platform