>>Hi everybody,
>>
>>If I delete records from the cursor which is source for the grid, the scrollbar now has a gap and could not be put at the top. Is there a way to fix this behavior or there is no way (as I found with filters)...
>>
>>What should I answer to the user who noticed this problem?
>>
>>Thanks in advance.
>
>Nadya,
>the solution it is simple.
>
>VFP uses RECNO()/RECCOUNT() when compute the scrollbar gap.
>
>When a index is active, it uses the index keyPos/keysCount.
>
>Then active a filtered index with FOR NOT DELETED() condition
>( on VFP9 this optimize se SET DELETED ON filter also )
>
>* on a cursor with none indexes, active this ( or faster idx )
>INDEX ON .T. FOR NOT DELETED() TAG TDEL
>
Interesting. Should I put it in every index I created on this cursor? This cursor is always in some order by one of the fields...
If it's not broken, fix it until it is.
My Blog