>>Edward: tell me method which have 100% agree with you.
>
>You use cursor as a grid.recordsource. This cursor will be filled 'on demand', i.e. when some variable (that you use for filtering now) changes you call Select ... Into cursor .... and refill the grid.
But not the same cursor, or the grid will rebuild. If a grid is fairly simple and field names are single words, it's OK, but if the grid has any code in its columns, I'd recommend what Marcia and Andy call "safe select":
One cursor is created for the grid, and it's readwrite. Whenever a new set of records is needed in this cursor, it is zapped (but not closed), and records are inserted into it. Now the way of insertion may vary - it can be SQL select into a temp cursor, then
Append from dbf("tempcursor")
or it may be direct
Insert into gridcursor select {field list} from ...
or even a loop that inserts records one at a time. And I agree - this is much faster than a view. View has to have a DBC open, and all the overhead that that brings. Plus the maintenance of such a DBC is pretty much the same amount of work as maintenance of individual select statements for grids, so the views only look simpler.