Jump to content

Recommended Posts

Posted

Or as an option  (also if other manipulation is needed) - change the case in the event handler of that field - in the recordset's field - onGetText:

     Text:=UpperCase(Sender.Value);
 

Posted

Thanks @Hayri ASLAN but I can change in specific field.

Thanks @alfr do this .. But don´t change. That's why I made the post. I tried several ways within the OnDrawColumnCell event.

I tryed this too:

TStringField( Column.Field ).DisplayText.Replace( TStringField( Column.Field ).DisplayText , Text , [rfReplaceAll] ) ;

Posted

No, not in the OnDrawColumnCell - instead in the event OnGetText for that field in the recordset that is linked to the unidbgrid datasource - see sample below

image.png.5efd39728478261bf23887eca06ac7b8.png

 

image.png.e4f0abb5875d6ec076127ec9c76432a3.png

 

Posted
8 hours ago, mikromundo said:

Thanks @Hayri ASLAN but I can change in specific field.

Thanks @alfr do this .. But don´t change. That's why I made the post. I tried several ways within the OnDrawColumnCell event.

I tryed this too:

TStringField( Column.Field ).DisplayText.Replace( TStringField( Column.Field ).DisplayText , Text , [rfReplaceAll] ) ;

Hi, It works for me.

Can you please create a test case to understand?

Posted
On 7/12/2020 at 5:24 PM, Hayri ASLAN said:

Hi, It works for me.

Can you please create a test case to understand?

In the DEMOS...CellStyle... I put the code:

image.thumb.png.9e696af60db6e045b541b25de185677e.png

   // My EXAMPLE - BEGIN
   if Acol = 0 then
   begin
     TUniDBGrid(Sender).Text := AnsiLowerCase( Column.Field.AsString );
     //TStringField( Column.Field ).DisplayText.Replace( TStringField( Column.Field ).DisplayText , AnsiLowerCase( Column.Field.AsString ) , [rfReplaceAll] ) ;
   end;
   // My Example - END

 

Thanks for read ...

I got it with attribs.style.cls... Thanks again !!!

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...