We created a class for achieving this, basically all We do is put a Custom object in the form and set one of it's properties to the name of the grid that we want to be Multi-Selected. This class in the init places an invisible shape covering the data area of the grid and it intercepts all events, preventing them to go directly to the grid, this way we can handle and decide what to do, once we know what to do, we send a click to the grid (if applies) to do it's default action (moving the record, firing the events, etc)
To mark the records as selected, we do not use a flag field, for that would be not to easy to implement at a class level, instead we create a cursor with only one field, which is the recno() of the parent table/view of the grid and set a relation to RECNO() something like:
create cursor c_selected (nrecord i)
index on nrecord tag nrecord
select (Grid.RecordSource)
set relation to recno() into c_selected
Because we handle all keyboard/mouse input in the invisible shape, it allows us to simulate all the selection as you can do in the explorer, handling Shift, Control, Shift+Control, etc.
We wrote this class some years ago, so details are fading out :)
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges