Subject [IBO]IB_Grid showing the editor when not editable
Author Paul Hope
For a long while now I have had trouble with non editable ib_grids showing
the InPlaceEditor. This steals the mouse so that OnCellClick no longer
works - I frequently use this for data drill down but it confuses users when
the click only works sometimes. I tried all the dont edit settings I can
find like the query readonly, PreventEditing (AlwayShowEditor is false).
Usually I give up and replace the grid with a non data aware one.

I think I have fixed the problem but I would like comments from IBOers in
the know who have meddled in this area or anyone else.

in
procedure TIB_CustomGrid.MouseDown(

there is a section

if (Button = mbLeft) and
(((Cell.X = OldCol) and
((Cell.Y = OldRow) or
(DataLink.Bof and (Cell.Y = OldRow + 1))) or
AlwaysShowEditor )) then
ShowEditor { put grid in edit mode }

I propose adding the CanEditModify condition as follows

if CanEditModify and //++++Paul Hope - to stop readonly
grids showing the editor and stealing the mouse
(Button = mbLeft) and
(((Cell.X = OldCol) and
((Cell.Y = OldRow) or
(DataLink.Bof and (Cell.Y = OldRow + 1))) or
AlwaysShowEditor )) then
ShowEditor { put grid in edit mode }

It appears to work but observations would be gratefully received.
Regards
Paul



[Non-text portions of this message have been removed]