Jump to content
Sign in to follow this  
limelect

Display Value at runtime

Recommended Posts

I have FdTable and  database grid

For the fields NOT to show  WIDEMEMO but the real value 

I have to change at RUN TIME    DispalyValue=dvFull

if FDTable1.Fields.DataType=ftWideMemo then  ???

if field kind is string then

change field DispalyValue to dvFull

 

Help on above 2 statements

Any help?

P.S. It seems I have to work with the BLOB?

Edited by limelect

Share this post


Link to post

I cannot fully understand the question either. My bet is that the TDBgrid for blob fields instead of the value displays (Memo). In order to correct that a solution is to use  the OnGetText event of the TMemoField/TWideMemoField:

 

Quote

procedure TForm3.FDQuery1MyMemoFieldGetText(Sender: TField; var Text: string; DisplayText: Boolean);
begin
  if DisplayText then
    Text:=Sender.AsString;
end;
 

 

Share this post


Link to post

Ok sorry, I will explain further.

Dblclick fdtable you get field editor.

Adding a field you get its property.

In the property you have displayvalue=dvfull. <<<<<

I need that at runtime.

Hop that has clarified

Otherwise, you have WIDEMEMO shown

Edited by limelect

Share this post


Link to post

Fixed some times i get old

 

 if  TBlobField(FDTable1.FieldByName (FDTable1.Fields.FieldName)).BlobType =ftWideMemo then
TBlobField(FDTable1.FieldByName (FDTable1.Fields.FieldName)).DisplayValue:=dvFull;
  in the fields, the HTML does not like I with []

Edited by limelect

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×