I have a grid where I am using conditional formatting to highlight data under certain conditions; everything is working fine except I'm not able to set the font colour/style for an individual textField.

I can use backgroundColorColumn on a textField but I can only use fontColorColumn at grid level and so the colour is applied to all columns in the row.

How can I set the font colour and/or style for an individual item to be based on a column value?



asked 11 May '13, 12:42

Craig's gravatar image

accept rate: 6%

Hi Craig,

As you mentioned the fontColorColumn attribute does not exist yet for the components existing into a grid.

However, you can simulate your request by setting the fontColor cell by cell after the executeQuery API call(if your datasource is being queried automatically, you should uncheck the "Query On Initialize" checkbox for your datasource and execute it on the postInitialize event of the panel containing the grid). In the code block called where executeQuery is called, just after the executeQeury API call, you can loop through grid rows using either api_dataource.getRows or api_datasource.getQuery APIs and set the fontColor at cell level using the api_component.setFontColor API, by providing the in_primarykey_tx parameter (your datasource definition should have a primary key column).

Hope this helps,


answered 11 May '13, 13:20

Ibrahim%20Sandalli's gravatar image

Ibrahim Sand... ♦♦
accept rate: 25%

Thanks for your response, I may give your suggestion a try.

Will the fontColorColumn attribute at item level be supported in the future?


(11 May '13, 15:32) Craig
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 11 May '13, 12:42

Seen: 1,019 times

Last updated: 11 May '13, 15:32

Related questions

© Copyright Gerger 2017