Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Child Grid displaying all records, at first
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00107957
Message ID:
00108088
Views:
43
>>>Here I am replaying to myself :-). Am I gunna get spanked for that?
>>
>>Naah... We allow everyone to reply to the person who needs it the most :-)
>>
>>>Anyway, the culprit for the above problem is....
>>>The child grid is in a page frame. The activate event of the page does a
>>>THIS.grd1.setfocus
>>>
If I take that out the grid displays normally.
>>>Why do I want a grid.setfocus in the activate event of a page - simple, it forces the record mark to appear on the grid so the user knows where they are.
>>>Any comments??
>>
>>Have you tried putting the setfocus into the page.refresh() code? I had the same trouble a couple of projects back, and I'm fuzzy on all the things I tried, but I looked at the form and saw a
>>
mygrid.refresh()
>>mygrid.setfocus()
>>
in the Page.Refresh()
>>
>>HTH
>>Barbara
>
>Thanks Barbara, that does help - it works. Still need to be careful though since there may be other reasons for doing a refresh within the page, and wouldn't want the grid getting the focus.

David: Add a form property "lGridFocus" and set it to T or F as needed. Then just check this in your Refresh()

Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform