In VFP grid source is ALWAYS a table (well it might be a cursor but a cursor is just another table). In other words if you don't dig into differences between them you might simply think a cursor and table as equal (at least would work for your case).
-First for you to be able to mark as deleted the cursor should be readwrite. ie:
with myGrid .RecordsourceType = 4 .RecordSource = "select * from customer into cursor crsCustomer readwrite" endwith
-And of course "set deleted off" - otherwise though it might look like it's working you'd get weird visual effects.
Then when user clicks the buttn you m ight scan...endscan within crsCustomer. ie:
select crsCustomer scan for deleted() * ... endscan
or just collect the ids of deleted and use that in a subquery (and say update or report out). ie:
update customer set Country = "New Country" where cust_id in (select cust_id from crsCustomer where deleted())
etc etc
Or you might get the public version of MultiSelectGrid class from universalthread.com downloads.
|