Information générale
Catégorie:
Codage, syntaxe et commandes
>I am developing a page that enables the user to develop strategy. Once the user enters the name, they should then be prompted to enter the conditions for that particular strategy. The number of conditions varies, depending on the strategy and user. So thought process is have them to enter strategy condition 1. Then press Save and Continue button, then the process should save that condition1 and display it at the bottom of the page. I am considering displaying all conditions entered and saved in a grid.
>
>My question is, if the grid does not dynamically adjust the sized based off the number of conditions entered and saved, is there a way to accomplish this? Any recommendation on displaying the data cleanly?
If all you want to do is collect a list of "conditions" and display them line-by-line, then a grid control tied to a cursor would be perfect. Just anchor the grid control to the bottom of the form.
At the top of the form you have your fields for entering conditions with the rest of the form dedicated to the grid control. When the user adds a condition, you simply add a new entry to the cursor and the VFP grid control will display it dynamically.
You can force the grid control to focus on the current record by doing (IIRC):
thisform.oGrid1.SetFocus()
thisform.oGrid1.Refresh()
The vfp grid control can be a tricky beast to tame. It often exhibits "strange" behavior. So depending on your project's requirements, it might be better to go with a simpler control (e.g. like the editbox field Dragan suggested).
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