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
>>>>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.