PRB: Form.SaveAs Appears to Change Order of Added Grid Column (132533)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
This article was previously published under Q132533 SYMPTOMS
The Form.Grid.AddColumn() method allows you to add a column at run time to
the grid, and have that column visually inserted between two existing
columns. If the Form.SaveAs method is then used to save the form, and the
form is modified by using the Form Designer, the newly inserted column
appears at the end of the list of columns.
CAUSE
This is by design. The ColumnOrder property of the new column is set to one
more than the current number of grid columns. When the form is saved and
reopened, the ColumnOrder property affects the display order of the columns
in the grid.
RESOLUTION
After adding a column through the AddColumn() method, set the ColumnOrder
property of the new column prior to saving the form. The preexisting
columns will have their ColumnOrder property incremented by one so that
they are properly displayed when the form is reopened.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 2/15/2000 |
---|
Keywords: | KB132533 |
---|
|