Subject | RE: [IBO] Customizing TIB_Grid (2) |
---|---|
Author | Thomas Steinmaurer |
Post date | 2001-08-14T13:17:25Z |
If I use OnGetDisplayText with:
procedure TfmMainForm.edLoggingGetDisplayText(Sender: TObject; ACol, ARow:
Integer; var AString: String);
var
tmpFld: TIB_Column;
begin
with TIB_Grid(Sender).DataSource.Dataset do begin
if Active and (ARow > 0) then begin
BufferRowNum := TIB_Grid(Sender).DataRow[ARow];
if BufferRowNum > 0 then begin
tmpFld :=
TIB_Grid(Sender).GridFields[TIB_Grid(Sender).DataCol[ACol]];
if Assigned(tmpFld) then begin
if tmpFld.IsNull then begin
AString := '<null>';
end else begin
if (tmpFld.FieldName = 'ALTERWERTBLOB') or (tmpFld.FieldName =
'NEUERWERTBLOB') then begin
AString := '(BLOB)';
end else begin
// AString := tmpFld.AsString;
end;
end;
end;
end;
end;
end;
end;
For example my IB_grid is shown as follow when the first record is selected:
SPALTE ALTER WERT NEUER WERT ALTER WERT BLOB NEUER WERT BLOB
---------------------------------------------------------------------
BLOBFIELD1 <null> <null> (BLOB) <null>
ID <null> <null> (BLOB) <null>
When I select the second record I get following:
SPALTE ALTER WERT NEUER WERT ALTER WERT BLOB NEUER WERT BLOB
---------------------------------------------------------------------
BLOBFIELD1 <null> <null> <null>
ID 2000000091 <null> <null> <null>
But it should be:
SPALTE ALTER WERT NEUER WERT ALTER WERT BLOB NEUER WERT BLOB
---------------------------------------------------------------------
BLOBFIELD1 <null> <null> (BLOB) <null>
ID 2000000091 <null> <null> <null>
Thanks
Thomas
procedure TfmMainForm.edLoggingGetDisplayText(Sender: TObject; ACol, ARow:
Integer; var AString: String);
var
tmpFld: TIB_Column;
begin
with TIB_Grid(Sender).DataSource.Dataset do begin
if Active and (ARow > 0) then begin
BufferRowNum := TIB_Grid(Sender).DataRow[ARow];
if BufferRowNum > 0 then begin
tmpFld :=
TIB_Grid(Sender).GridFields[TIB_Grid(Sender).DataCol[ACol]];
if Assigned(tmpFld) then begin
if tmpFld.IsNull then begin
AString := '<null>';
end else begin
if (tmpFld.FieldName = 'ALTERWERTBLOB') or (tmpFld.FieldName =
'NEUERWERTBLOB') then begin
AString := '(BLOB)';
end else begin
// AString := tmpFld.AsString;
end;
end;
end;
end;
end;
end;
end;
For example my IB_grid is shown as follow when the first record is selected:
SPALTE ALTER WERT NEUER WERT ALTER WERT BLOB NEUER WERT BLOB
---------------------------------------------------------------------
BLOBFIELD1 <null> <null> (BLOB) <null>
ID <null> <null> (BLOB) <null>
When I select the second record I get following:
SPALTE ALTER WERT NEUER WERT ALTER WERT BLOB NEUER WERT BLOB
---------------------------------------------------------------------
BLOBFIELD1 <null> <null> <null>
ID 2000000091 <null> <null> <null>
But it should be:
SPALTE ALTER WERT NEUER WERT ALTER WERT BLOB NEUER WERT BLOB
---------------------------------------------------------------------
BLOBFIELD1 <null> <null> (BLOB) <null>
ID 2000000091 <null> <null> <null>
Thanks
Thomas
> -----Original Message-----
> From: Tobias Giesen [mailto:tobias_subscriber@...]
> Sent: Tuesday, August 14, 2001 2:39 PM
> To: IBObjects@yahoogroups.com
> Subject: RE: [IBO] Customizing TIB_Grid (2)
>
>
> Hi!
>
> well the first thing I'd try is simply checking the AString parameter for
> being an empty string. Do you have special cases where empty
> strings are not
> null? If so, you only need the other logic in order to check for those.
>
> Cheers,
> Tobias
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>