Solved

To shade a row for a particular condition.

Posted on 2006-11-27
8
487 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Visual Studio 2015 and Uninstall of Web Essentials 2 1,064
How do I import Java .jars and libraries into Eclipse? 4 74
Java Help 2 79
I could not build boost code, 10 78
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. …
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
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 perform CRUD operations on a MySql database.

930 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now