Hi Agnes,
I hope you're feeling all right now. I solved the problem using CursorRefresh method.
Thanks a lot again.
>Naomi,
>
>sorry for being late. I spraind my ankle seriously so I was AFK.
>
>Do I understand the cursor of Adapter.alias is open befor you call CursorFill? This seems the wrong way.
>If you need to "reuse" an open cursor in a CA then CursorAttach would do the job. CursorFill will create a new cursor.
>
>
>I would prefer
>
>Adapter.cursorfill(.t.)
>Grid.recordsource = adapter.alias
>
>***
>*later
>Adapter.cursorrefresh
>*to get
>
>
>But this would need to set all grids and columns properties via code.
>
>Check also BINDCONTROLS
>
>Agnes
>>>Ed,
>>>
>>>it sounds like you change the recordsource of the grid like
>>>
>>>
>>>*your query
>>>.grid.recordsource = 'curSorName'
>>>
>>>
>>>this will remove all columns and create new one. The newly created will know nothing about your preset.
>>>
>>>consider the use of a CursorAdapter and bud the cursoradapter.alias to the grid.
>>>
>>>Agnes
>>
>>Agnes,
>>
>>I have a CursorAdapter and its alias is a recordsource for the grid. When I execute CursorFill(.t.) for the CA, the grid becomes blank. Should I use safe select approach here or there are other alternatives?
>>
>>Thanks in advance.
If it's not broken, fix it until it is.
My Blog