Subject Using TIB_GRID multi selection
Author Russell Belding
Hello Jason
(apology if this appears twice - had trouble connecting )
Using IBO4.2Ib.

A. TIB_GRID Deselection of multiple rows.

After multiple rows are selected in a TIB_Grid, as far as I
can tell, the only way to deselect them using the grid interface is to close
the form containing the grid.

See "Selecting multiple rows in TIB_Grid" comments by Marco (who gives code
for selelection) and myself.

Rather than inserting code for each grid to deselect would you suggest a
place to put some code to allow "windows standard deselection"? I am not
confident of selecting a good place for this in the IBO code.

B. The TIB_Grid OnMultiSelect event

This event fires when using Shift+(Right or Left) Mouse click but not when
using Ctrl+(Right or Left) mouse click.

If it fire on both I could use the event to update the list of selected
rows.
Where should code be placed to repair this?

C. Temporary Deselection Code

Marco: On my setup multiple rows can be selected using the left ot right
mous click plus (Ctrl or Shift) so the deselection code should be done with
either button and should be

if ((AButton = mbLeft) or (Abutton=mbRight)) and not ((ssShift in AShift)
or (ssCtrl in
AShift)) then
((Sender as TIB_Grid).DataSource.Dataset as TIB_Query).SelectAll(False);

I am using the ITB_GRID.OnMouseUp event to implement deselection.

However the TIB_GRID.OnMouseUp event is not firing when either of
Ctrl+RightMouseUp or Shift+RightMouseUp occurs
unless the click is done in a fixed column in whish case the event fires.

So the revised code should be used but there is a preference for the left
mouse button in deselecting rows.

Thanks for your help.

Russell