Subject Re: [IBO] Using TIB_GRID multi selection
Author cg_bland
Russell,

We would be interested - if you have published this, apologies. The
link would be useful.

We are trying to get the grid to behave like a list view. I.e. we
wish to deselect/select rows, in the normal windows fashion, and then
act on them.

Bookmarks are working fine.


Regards
Chris

PS I am a newbie...

--- In IBObjects@yahoogroups.com, "Russell Belding" <russell@b...>
wrote:
> Despite the problems in TIB_GRID with multiselect of rows it is
possible to
> 1. Detect when many rows have been selected.
> 2. Deselect them and detect when they have been deselected.
> 3. Change a selected row's boolean field and give that value to the
other
> selected rows.
> 4. Change a selected row's value in a embedded TIB_Lookupcombo and
give that
> value to the other selected rows.
> 5. Change a selected row's TDate field and give that value to the
other
> selected rows.
>
> Perhaps there is an example of this published somewhere? If there is
> interest I'll post some more details here.
>
> Regards
>
> Russell
>
> ""Russell Belding"" <russell@b...> wrote in message
> news:as5a8v$6g8$1@......
> > 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
> >
> >
> >
> >
> >
> >
> >
>
______________________________________________________________________
_____
> > 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/
> >
> >
> >