Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: How to change the colour of the particular cell in TGrid-DelphiXE7 FireMonk


This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Mar 17, 2015 8:34 AM Last Post By: Borja Serrano
Delphi Developer

Posts: 37
Registered: 1/11/13
How to change the colour of the particular cell in TGrid-DelphiXE7 FireMonk  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 17, 2015 12:18 AM
Hi. I'm using Tgrid in Delphi XE7 Mobile application and in that I need to change the font for only particular cell. I have tried [this code|http://stackoverflow.com/questions/12889428/coloring-cell-background-on-firemonkey-stringgrid-according-to-value-from-data] .But this changes the total cell colour of the TGrid. But when I used [this code|http://monkeystyler.com/guide/Formatting-a-Column-as-Currency], it does not changes the font colour of the particular cell in TGrid. Please provide me any sample code. And I don't know how to change the font colour of the particular Grid and I have tried my level best. Please provide me the solution. Thanks in Advance.
Borja Serrano

Posts: 172
Registered: 1/10/13
Re: How to change the colour of the particular cell in TGrid-DelphiXE7 FireMonk
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 17, 2015 8:34 AM   in response to: Delphi Developer in response to: Delphi Developer
As explained in another thread you have to use:

http://docwiki.embarcadero.com/Libraries/XE6/en/FMX.Grid.TCustomGrid.OnDrawColumnCell

Just set DefaultDrawing to false and draw all the content of the cell (FillText to write). Take a look at the TGrid code. That will definitively help you.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02