Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 5 Grid Not Refreshing
Message
 
To
13/12/2001 12:48:13
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00592329
Message ID:
00594074
Views:
43
Yes, it does!
I understand the code but I do not understand why it works.
In other words, what assumptions are made about what would (and would not) be visible on the grid if this code was not run?
I really want to understand the underlying gotchas of grids so that I can become more self sufficient.
Thank you very much.

>I hope this works :
>
with thisformset.FCompany.Egridsrpricat
>  lnRows = floor((.height - .headerheight - sysmetric(8))/.rowheight)
>  for ix=1 to lnRows
>    .DoScroll(0)
>  endfor
>  .Setfocus()
>endwith
Cetin
>
>>Cetin,
>>
>>The scenario is the grid is 4 rows and there are 4 rows in the table.
>>The grid currently displays rows 1-4. I click on the last row in the grid and then click on a command button somewhere else on the same form. This button invokes another form in the formset where the user edits the one row. The 'OK' button on the 2nd form does the code below. When the grid is redisplayed the only row visible is the 4th row which is at the top of the grid as if it is the only row and manual scrolling is necessary to see rows 1-3.
>>If more or less rows are in the table or another row is selected for editing the code below displays the rows correctly.
>>TIA.
>>
>>thisform.VISIBLE=.F.
>>thisformset.FCompany.Egridsrpricat.doscroll(2)
>>thisformset.FCompany.Egridsrpricat.doscroll(3)
>>thisformset.FCompany.Egridsrpricat.setfocus()
>>thisformset.FCompany.refresh()
>>thisformset.FCompany.visible = .T.
Regards,

Allan Coganovitch
allanc@proven-solutions.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform