Subject | Re: [IBO] Prevent grid from getting into "edit" mode |
---|---|
Author | Andreas Pohl |
Post date | 2004-07-22T09:00:11Z |
Hi Daniel,
To avoid editing calculated field try OnCellGainFocus event of TIB_Grid,
e.g.:
procedure TGridForm.gridCellGainFocus(Sender: TObject; ACol,
ARow: Integer);
begin
if acol=1 then begin
grid.Col:=2;
abort;
end;
end;
Now bitmap of calculated field is always displaying.
--
Andreas
> Hm nope, not quite. The problem is, I only want *this* column towhy not? It's working well.
> be not editable. The rest of the grid/query behaves correctly.
> You can edit, insert and delete from it.
>
> And btw., is the "having a fake calculated field" the right
> aproach to have an additional column in the grid?
To avoid editing calculated field try OnCellGainFocus event of TIB_Grid,
e.g.:
procedure TGridForm.gridCellGainFocus(Sender: TObject; ACol,
ARow: Integer);
begin
if acol=1 then begin
grid.Col:=2;
abort;
end;
end;
Now bitmap of calculated field is always displaying.
--
Andreas