Information générale
Catégorie:
Codage, syntaxe et commandes
For the second part of your question, to ask and then save or abandon, use buffering:
In Load:
=CURSORSETPROP('Buffering', 5, 'MyDetailTable')
When saving:
IF MESSAGEBOX('Save this data?', 4, '')=6
=TABLEUPDATE(1, .T., 'MyDetailTable')
ELSE
=TABLEREVERT(.T., 'MyDetailTable')
ENDIF
If the data you are entering is to the detail table, set the grid RecordSource property to the alias of the detail table. Then when you want to add a record, INSERT INTO the detail table and refresh the grid to see the empty line. Cetin is right, it can be complex. If all your data can be input directly into the default textboxes in each column, you are probably okay having the user enter directly into the grid. If you want to validate any of the data against a lookup table, for example, then maybe a textbox is not the best control to have in the column, and the process is more advanced.
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