Good morning!

I must be asking way too many questions, but this is due to my sincere interest at your project :-)

In Forms, we can have a post-query trigger on a block that allows us to do a lot of things while the data is being fetched. We can compute non-DB fields, do formatting (ex., color coding) at the row level, and etc. The implementation does have its pros and cons, but it's there.

Is there similar functionality in Formspider that would allow a developer for changing a row background color in a grid based on a field value? Say, in your master-detail example, I'd like to change row color and font style in the bottom grid based on the hire date value.

asked 11 Dec '11, 22:38

Ilia%20Sazonov's gravatar image

Ilia Sazonov
accept rate: 0%

Hi Ilia,

Instead of post query triggers, we use wrapper views. We define columns for non-DB fields and row level formatting.

To change background color and font style on row level, you can create bgColor and fontStyle columns in your Datasource Definition view (or query). Then, you can bind backgroundColorColumn and fontStyleColumn attributes in the grid XML to the columns you created (bgColor and fontStyle). I sent you a sample application for this.


answered 12 Dec '11, 02:10

Ugur%20Kocak's gravatar image

Ugur Kocak ♦
accept rate: 23%

Thank you! This is what I was looking for! Can we use a datasource column name as a value for other attributes? For example, if I want to enable/disable a component (a button or a field), can I set enable="myDatasourceColumn"?


answered 12 Dec '11, 03:01

Ilia%20Sazonov's gravatar image

Ilia Sazonov
accept rate: 0%

You are welcome. We can bind attributes as ...column to datasource columns. So, we can not bind enable attribute to a column. However we can set enable attribute in runtime. After executeQuery of datasource, use API
to iterate on rows. Then, if you want to set a field to disable, use API
api_component.setEnable(in_panelDotComponentName_tx, in_enabled_yn, in_primaryKey_tx)
Parameter in_primaryKey_tx specifies that on which row you want to enable/disable the component. You should give the value of the primary key column of Datasource Definition.


answered 12 Dec '11, 03:33

Ugur%20Kocak's gravatar image

Ugur Kocak ♦
accept rate: 23%

Hello Ugur, can you please provide the solution for the binding of fontstyle and bgColor with the XML Grid ? Could you paste here some examples. Thanks Uwe


answered 21 Nov '13, 04:02

Uwe%20K's gravatar image

Uwe K
accept rate: 0%

Hi Uwe,

You can find examples in this tutorial.

Best Regards,

(21 Nov '13, 05:45) Ibrahim Sand... ♦♦
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]( "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 Dec '11, 22:38

Seen: 7,160 times

Last updated: 21 Nov '13, 05:45

© Copyright Gerger 2017