Subject | Showing NULL-Columns as in TIB_Grid |
---|---|
Author | Thomas Steinmaurer |
Post date | 2001-11-21T22:38:13Z |
Hi list,
what is the best way to show NULL-Columns as string "<null>" in
TIB_Grid?
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?
Thanks
Thomas
what is the best way to show NULL-Columns as string "<null>" in
TIB_Grid?
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?
Thanks
Thomas