Subject Re: Prevent grid from getting into "edit" mode
Author Mihai Chezan
--- In IBObjects@yahoogroups.com, Daniel Albuschat <daniel@v...>
> wrote:
> Hm nope, not quite. The problem is, I only want *this* column to
> be not editable. The rest of the grid/query behaves correctly.
> You can edit, insert and delete from it.
You could try this:
on the OnGetText event of the grid:
procedure TFormXXX.GridXXXGetEditText(Sender: TObject; ACol,
ARow: Integer; var Value: String);
begin
if (ACol = your_column) then
GridXXX.EditorMode := false;
end;

I've tested it and it seems to work - to prevent the edit caret appear
when you double click the column (or hit enter).

ps: I've just discovered this by trial and error since I don't know
what EditorMode does (no help for it)