Subject Re: [IBO] Re: Selecting multiple rows in TIB_Grid
Author Russell Belding
Hello Marco

The deselection logic you suggested and I promoted needs more work.
Otherwise clicking inside a selected row will deselect all rows.

> I had to use the following (suggested) code:
> if (AButton = mbLeft) and not ((ssShift in AShift) or (ssCtrl in
> AShift)) then
> ((Sender as TIB_Grid).DataSource.Dataset as
TIB_Query).SelectAll(False);
>

The logic

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

works better but in my test grid I am experiencing erratic results.
Sometimes clicking in a selected cell will deselect all rows. I have not
tried to diagnose why I see erratic behaviour. I am hoping Jason will
implement multi-select to Windows standard behaviour.

At least this woks well enough to allow me to select many rows and enter a
cell in a selected row to change an embedded ComboBox and used the changed
result to change the combo box in all selected cells.

Are you looking at this?

Regards

Russell