Subject Re: [IBO] Prevent grid from getting into "edit" mode
Author Lucas Franzen
Hallon Daniel,

Daniel Albuschat schrieb:

> Hello,
> I have a problem with TIB_Grid, but first
> want to make sure that what I do isn't "an
> advanced way of shooting in my foot" again. ;)

Yep, since this was me I think I should answer once again :-)

So, prepare yourself....

> I wanted to display an icon in the grid,
> so the first thing I needed was an empty field
> that I could abuse for rendering the icon.
> The only way I found was creating a dummy
> calculated field (of type char) with no
> content, and using it's cell for rendering the
> icon. Then, in the OnDrawCell event I do
> the drawing. This works quite well, except for
> one problem: The user can still press Return (or
> click into the cell) and get into edit mode, with
> no icon, but an binking cursor and an empty field.

If you just want to avoid the grid to enter edit mode, just set the
PreventEditing property of the IB_Grid.
(If you don't want the query to be editable at all you can use the same
property at IB_Query level).

Is it that what you are looking for?