Subject Re: [IBO] Showing NULL-Columns as in TIB_Grid
Author Luiz Alves
Thomas,

> One way could be to use the OnGetDisplayText event:
>
> with TIB_Grid(Sender) do begin
> if Assigned(DataSource) and Assigned(DataSource.Dataset) then begin
> if DataSource.Dataset.Active and (ARow > 0) and (ACol > 0) then
> begin
> DataSource.Dataset.BufferRowNum := DataRow[ARow];
> if (DataSource.Dataset.BufferRowNum > 0) then begin
> if GridFields[ACol - 1].IsNull then AString := '<null>';
> end;
> end;
> end;
> end;
>
> Is there another, probably faster way or is there already a solution
> where I could simply switch a property, which does the job for me?

In IBO4, I believe this code need some modifications since as BufferRowNum
can assume negative, zero and positive values.
Maybe,
.......
.......
if (abs(DataSource.Dataset.BufferRowNum) >= 0) then begin
if GridFields[ACol - 1].IsNull then AString := '<null>';
end;

works better.

Another option is, if you donĀ“t need edit values, to use a calculated field.

Luiz.