Information générale
Catégorie:
Codage, syntaxe et commandes
>IF thisform.actNewType.Caption = "Cancel Add Tool Type"
> IF EMPTY(thisform.txtDescription.Value)
> MESSAGEBOX("Please provide a Description")
> thisform.txtDescription.SetFocus
> RETURN
> ENDIF
>
> thisform.txtDescription.Visible = .F.
> thisform.chkHasFeedback.Visible = .F.
> thisform.chkNeedsMaint.Visible = .F.
> thisform.chkHasFeedback.Visible = .F.
> thisform.chkNeedsSN.Visible = .F.
>
> INSERT INTO (thisform.grdToolType.recordsource);
> (description,needsSerialNo,needsMaintenance,hasFeedback,isActive);
> VALUES;
> (thisform.txtDescription.value, thisform.chkNeedsSN.value, thisform.chkNeedsMaint.value,
> thisform.chkHasFeedback.value,1)
>ENDIF
>
>thisform.LockScreen = .T.
>thisform.actNewType.Caption = "Add New Tool Type"
>
>SELECT (thisform.grdToolType.recordsource)
>lcFilter = SET("FILTER")
>SET FILTER TO
>
>thisform.oDataClass.update_remote_table("mech_pib","crsToolType","tool_type","idtool_type")
>thisform.oDataClass.get_table("mech_pib","tool_type","crsTemp")
>
>SELECT (thisform.grdToolType.recordsource)
>ZAP
>APPEND FROM DBF('crsTemp')
>SET FILTER TO &lcFilter
>GO TOP
>
>thisform.grdToolType.refresh
>
>MESSAGEBOX("Data has been saved")
>
>thisform.LockScreen = .F.
>
>At this point there are no records displayed in the grid. The cursor has the expected number of records. If I press a navigation button the grid displays the correct recordset. I put a KEYBOARD command at the end of the method and it's working but I would appreciate an explanation as to why I need to do that.
>
>The cursor is created by an SQLEXEC and the buffering is whatever the default would be for that (I think 3).
>
>Thanks to all.................Rich
There is a VFP bug.
if the focus is on the grid and it is empty,
remains empty and does not show the records.
Grid.Refresh not load the grid lines.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement