Microsoft KB Archive/138056

= FIX: CurrentControl Property of Grid Column Reverts to Default =

Article ID: 138056

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition

-



This article was previously published under Q138056



SYMPTOMS
On a form that contains a PageFrame with multiple pages, if one of the pages is modified, then the CurrentControl property of all the grid columns in some of the pages is reset to the default of Text.



WORKAROUND
Delete the Text object for all the columns for which you want the current control to be different from the default of Text.



STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been fixed in Visual FoxPro 5.0 for Windows.



MORE INFORMATION
This problem occurs when a form that has a PageFrame object that has two or more pages with the following setup:


 * All pages of the PageFrame object contain a grid.
 * For each of the grids, the CurrentControl property for one or more of the columns is set to a control other than the default of Text. For example, it is set to Combo1, List1, or Check1.
 * The form has been saved and then run.

If changes are made to any one of the pages, then in all of the subsequent pages, the CurrentControl of the grid columns reverts to the default of Text if they are not already set to that before the modifications. However, the CurrentControl property of the grid columns in the edited page and those pages that precede it are not changed.

Steps to Reproduce Problem

 * 1) Create a form and add a table that has at least two fields in it to the data environment.
 * 2) Place a PageFrame object on the form, and set the PageCount property of the PageFrame to 4.
 * 3) Edit the PageFrame, and select the first Page. Place a Grid object on the first page, and set the grid's ColumnCount to 2.
 * 4) Edit the grid to insert a combo box into the first column and an edit box into the second column.
 * 5) Set the CurrentControl property of the first column to the combo box and that of the second column to the edit box.
 * 6) Select and Copy the grid plus any other controls that you may have on the page. Then paste them into the rest of the pages.
 * 7) Save and run the form.
 * 8) Close and then edit the form. Make some changes to the second page of the form. For example change the size or position of the grid or of another form control that you may have on the page.
 * 9) Run the Form.

You will see that the columns of the grids on Pages 3 and 4 do not display the combo box or edit box. Whereas, those in pages 1 and 2 still display the two controls. If you edit the form, you'll see that the CurrentControl of the columns in the grids on Pages 3 and 4 has reverted back to Text.

Example Steps to Work Around Problem

 * 1) Select the Text object for the grid column from the Properties dialog box.
 * 2) Click the grid in the form where you have selected the Text object, and then press the DELETE key.

Additional query words: grid pageframe

Keywords: kbbug kbfix kbvfp500fix KB138056

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.