Solved

To shade a row for a particular condition.

Posted on 2006-11-27
8
495 Views
Last Modified: 2013-12-26
PB7:

In a datawindow I have written this expression in every column.
if( diff<>0 , rgb(187,190,198), rgb(255,255,255))   [ written on Backgroun Colour Property ]
Because of this , the complete row is shaded if value of column diff<>0.

Is it possible to have the same effect by writing the above expression at one place only.
0
Comment
Question by:Mateen
  • 4
  • 3
8 Comments
 

Author Comment

by:Mateen
ID: 18018441
Please note that, If I write the expression in detail band then it will work in normal mode. It will not work in print preview mode.
0
 
LVL 14

Expert Comment

by:sandeep_patel
ID: 18026115
Hi,

Ofcourse there is work around !!!!!!!!!.

Put one static text behind all columns and set background property for that static text control. Remember back ground color property for all columns should be 'TRANSPERANT'

Good Luck !!!!!!!

Regards,
Sandeep
0
 

Author Comment

by:Mateen
ID: 18026593
Yes,
Your technique worked even in preview mode.
I have to put static text in [ ALL ] columns.

Is it possible to do the same by doing it at on place ( instead of ALL columns).

Thanks 4 your answer.




0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 14

Expert Comment

by:sandeep_patel
ID: 18026703
Hey,

why u need to pur static text in all columns.

Can't u put a single long static text which covers all columns  ?

Ofcourse instead of individual column in that row it will display entire row in different color. I mean there won't be any gape inbetween columns. Entire row will be of different color u set. But i think that should not be the problem for user.

Regards,
Sandeep
0
 

Author Comment

by:Mateen
ID: 18026812
I am using grid datawindow.
0
 
LVL 14

Accepted Solution

by:
sandeep_patel earned 500 total points
ID: 18026927
Ohhhhhhhhhh,

Ok then another solution......

write a script to set property runtime rather design time.
Script should be written in constructor event for that datawindow like....


long ll_count, ll_col

ll_col = Long(This.Object.datawindow.column.count)

For ll_count = 1 To ll_col
     dw_list.Modify("#"+string(ll_count)+".background.mode = '2'")
     dw_list.Modify("#"+string(ll_count)+".background.color = '553648127~tif( diff<>0 , rgb(187,190,198), rgb(255,255,255))'")
Next

Hope this will work now.

Regards,
Sandeep
0
 
LVL 14

Expert Comment

by:sandeep_patel
ID: 18026937
sorry,

in above solution 'dw_list' should be replaced with 'This' or your datawindow name.
0
 

Expert Comment

by:BradAndMindy
ID: 23564947
To change the background color of a row based on a given value of a column in that row put a variation of the following in the datawindow's detail band color expression:
if(  code_status ="I",rgb(187,190,198),rgb(255,255,255))
The RGB combinations above will highlight "I"nactive codes with a gray background. Substitute your column and condition value to suit your needs.  
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question