Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids & CursorAdapter CursorFill()
Message
From
06/01/2011 03:55:30
 
 
To
06/01/2011 03:51:04
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MySQL
Application:
Desktop
Miscellaneous
Thread ID:
01494587
Message ID:
01494888
Views:
60
Did you test without the CA, in case the "safe select" solution works differently with a CA?

>Tore,
>
>Another shot in the dark. I have found that sometimes VFP is simply too quick to get all objects "in sync". Try Inkey(1,'HM') before the refresh().
>
>Still no luck sir. I tried INKEY( 1, "HM" ) before the Refresh(), also after it. I also tried different values for the 1st INKEY() parameter.
>
>What worked so far, but which does not feel 'right', is putting KEYBOARD '{UPARROW}'. This works with or without grid.Refresh(), or SetFocus(). What d heck is behind this logic sir?
>
>Thanks
>Dennis
>
>
>
>>>Absolutely none sir. This happened to me once before. Couldn't really figure why. The CA and the TempCursor cursors get populated with data though. After myGrid Refresh, it just shows a blank grid (but with the columns intact). I have to press Up or Down key before the records show up!
>>>
>>>The form the grid is in accepts the CA as an object parameter. There is an oCursor property where I stored the CA object, which also in the Init() calls its CursorFill(). I also pass oCursor property into an oCursor property of the concerned grid which in turn creates the TempCursor for its RecordSource.
>>>
>>>Dennis
>>>
>>>
>>>>>Tore,
>>>>>
>>>>>Update!
>>>>>
>>>>>Add Go Top before mygrid.refresh().

>>>>>
>>>>>Sorry, there really was a GO TOP like so:
>>>>>
>>>>>
>>>>>myCA.CursorFill()
>>>>>SELECT Tempcursor    && where Tempcursor is the 'permanent' RecordSource of myGrid
>>>>>ZAP
>>>>>APPEND FROM DBF( myCA.Alias )
>>>>>GO TOP
>>>>>myGrid.Refresh()
>>>>>myGrid.SetFocus()
>>>>>
>>>>>
>>>>>Dennis
>>>>
>>>>Are you sure that you don't have any code in refresh() or setfocus()? I use this solution all the time.
Previous
Reply
Map
View

Click here to load this message in the networking platform