Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text box outside the Grid
Message
From
26/01/2003 07:38:50
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
26/01/2003 07:16:11
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00745515
Message ID:
00745517
Views:
19
>Hi everybory,
>In the grid, I have some columns like stock number, unit, quantity etc. There are few text boxes elsewhere on the form. Control source of these text boxes and the record source of grid is same table. Whenever I go up or down in the grid, the values of these text boxes change accordingly. But, if I click on the text box, I am getting the reference of the previous row of the grid where I was. In the When event of the text box, I checked the value of the stock number. It is showing me the stock number of the row where I was before coming to the current row. Why am I not getting the stock number of the current row?
>
>Regards
>Yashodhan

When you change to another record, in the grid or otherwise, you should issue a Refresh() method, either for the textboxes or for some object that contains them. (However, the Refresh() should not include the grid.)

However, if you forget to do this, the problem is usually the other way round: the TextBox does not show the updated value - until you click in the textbox.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform