>The width of one of the columns of my grid gets narrower after refreshing the cursor. The cursor is "refreshed" by issuing another Select.
>
>The grid's RecordSource is coded to point to the cursor, the cursor is created in the Load Method of the form. When the form is first displayed all of the columns are the width of the fields of the cursor.
>
>A refresh of the cursor is done by doing the Select into the cursor, then Grid1.RecordSource is set to the cursor (again). At this point the last column of the grid shrinks to half of its size and does not display all of the data contained in it. Very strange.
>
>Does anyone have a fix for this?
This is possible disadvantage of the 'refreshing' method (Grid.RecordSource="", Select-SQl,Grid.RecordSource="tmpCursor"). Surely, you can reset not only RecordSource, but Column.Width too. However, the safer technology is following:
Select tmpCursor
Set safety off
Zap
Set Safety on
Select .... Into array aTmpcursor && can be limited by array size
Insert into tmpCursor from array aTmpcursor
Thisform.Grid.Refresh
Edward Pikman
Independent Consultant