Subject Re: [IBO] Re: Selecting multiple rows in TIB_Grid
Author Russell Belding
OOPS! My mistake. See th ecorrection below.

""Russell Belding"" <russell@...> wrote in message
news:as69n7$isa$1@......
> 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 )

Should be .Y, not .X

Russell

> then
> ((Sender as TIB_Grid).DataSource.Dataset as
TIB_Query).SelectAll(False);
>
> works better but in my test grid I am experiencing erratic results.
The modified code is not erratic and works OK
> 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
>
>
>
>
>
___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
> without the need for BDE, ODBC or any other layer.
>
___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>