>>>Hi everybody,
>>>
>>>I set up a grid using a grid wizard. For all of the columns the Headers came from the database where I have them defined. However, for one of the headers I wanted a different caption, so I set it in design-time.
>>>
>>>I just noticed that in run-time the Header's caption is wrong (it's the original caption from the table). How can I make it to use the Caption set in design-time?
>>
>>VPM will insert its own grid column headers from the data dictionary unless you tell it otherwise. Set the Grid's lgridoverwritecaption -property to .T. to keep your design time column headers. Note that this is all-or-one -type of property -- it affects ALL column headers.
>
>Thanks, will do.
>
>See my more pressing problem with GetFldState()
>
>Do you think I can set BindControls to .f. and to .T. in activate after default() to avoid this behavior?
You could use SETFLDSTATE() right after assigning the value to reset that particular field's change flag back to 1 (unchanged.) This affects GETFLDSTATE() -result, which is what VPM is looking to determine if there have been any changes -- so if all fields are flagged unchanged, VPM will not consider anything changed and thus will not fire "Save Changes" -questions.
Evidently, SETFLDSTATE() has a bug (or is it a feature?) in that TABLEUPDATE() will still consider a field who's status has been changed with SETFLDSTATE() as a changed field, and it WILL send the current value in that field back to the database. In your case this doesn't matter, really, so it should be one good solution.