deutschsprachige FoxPro User Group
Forum View
Home
  
  Packing Data in a cDataForm- #14074 in section [742234]
Sec: (29) VFX english
Von: David Phillips
An: ALL
Am/Um: 25.08.2019 09:03:21 gelesen

--from Newsreader at Sonntag, 25. August 2019; 09:03:21--

Dear Uwe,
I have created a number of file maintenance forms and added a command button to pack the table.

Before packing I issue
thisForm.PGFPAGEFRAME.Page1.grdGrid.RecordSource = ''

and after packing I issue
thisForm.PGFPAGEFRAME.Page1.grdGrid.RecordSource = 'Doctors'

This allows me to successfully repopulate the grid but I have later noticed that the columns in the form are now (after the pack) displaying the incorrect field from the table. The columns in the grid are displaying the data exactly as a browse would and not as the columns are set up in the grid. For example the Doctors Address column now displays the Doctors Phone number instead and the Doctors Phone number column displays his specialty.

I have worked around this problem with
* Having to explicitly assign Columns as it goes native by default ie in native order of fields
thisForm.PGFPAGEFRAME.Page1.GRDGRID.Column1.controlSource='Initials'
thisForm.PGFPAGEFRAME.Page1.GRDGRID.Column2.controlSource='Dr'
thisForm.PGFPAGEFRAME.Page1.GRDGRID.Column3.controlSource='DrCode'
thisForm.PGFPAGEFRAME.Page1.GRDGRID.Column4.controlSource='PrescType'
thisForm.PGFPAGEFRAME.Page1.GRDGRID.Column5.controlSource='DrTown'
thisForm.PGFPAGEFRAME.Page1.GRDGRID.Column6.controlSource='DrPhone'

I have not managed to work out why this is happening. Is there something I am missing that I should be doing when refreshing the grid after a pack is issued.

Kind Regards,
David









This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus





David Phillips   25.08.2019 09:03
Uwe Habermann  25.08.2019 15:06
  
zurück zum Forum