This topic is locked

How to fill whole row with colour?

9/6/2013 2:56:24 AM
PHPRunner General questions
P
phpcmk author

Hi,
I am trying to fill the whole row with colour if a criteria is met.
Example: I have a date column and if any record has a date entered into this column, I need the whole row to be filled with colour.
Can anyone kindly advise on this? Thanks.

P
phpcmk author 9/9/2013



Check this article http://xlinesoft.com/blog/2011/01/03/tutorial_conditional_formatting/


Hi,
I have tried the code but it seems not working. Is the following code applied correctly?
Please kindly advice. Thanks.
Under Events > List page > List page: After record processed



if ($data["tenderdate"]!="")

$row["rowstyle"]='style="background:yellow"';
C
cgphp 9/9/2013

The code is correct however it stops working when column widths were adjusted in Visual Editor. When you adjust column width in Visual Editor IE editing engine adds style attribute that conflicts with style attribute PHPRunner uses.
Sergey suggests two things you can do to solve the issue:

  1. Reset page in Visual Editor. May not be very helpful if you do need to change column widths.
  2. Add the following style code to the page in question

<style>

.runner-b-grid td {background: none !important;}

</style>
P
phpcmk author 9/9/2013



The code is correct however it stops working when column widths were adjusted in Visual Editor. When you adjust column width in Visual Editor IE editing engine adds style attribute that conflicts with style attribute PHPRunner uses.
Sergey suggests two things you can do to solve the issue:

  1. Reset page in Visual Editor. May not be very helpful if you do need to change column widths.
  2. Add the following style code to the page in question

<style>

.runner-b-grid td {background: none !important;}

</style>



I have added the code using the html mode. However, only when I opened in Google Chrome, the entry is highlighted in yellow. But when I opened using IE, the row is not being highlighted.
Before I implemented the style code, it works the opposite. Only when viewing in IE, the record will be highlighted.
Is it due to browser issue? I have tried to clear cookies but still the same.



<HTML {$html_attrs}><HEAD><TITLE>{$pagetitle}</TITLE>

<style>

.runner-b-grid td {background: none !important;}

</style>

<META content=IE=7 http-equiv=X-UA-Compatible>

<META content="text/html; charset=utf-8" http-equiv=Content-Type><LINK rel=stylesheet type=text/css href="styles/default.css">{BEGIN rtlCSS}<LINK rel=stylesheet type=text/css href="styles/defaultRTL.css">{END rtlCSS}{BEGIN styleCSSFiles}<LINK rel=stylesheet type=text/css href="{$stylepath}">{END styleCSSFiles}{BEGIN pageCSSFiles}<LINK rel=stylesheet type=text/css href="{$pagestylepath}">{END pageCSSFiles}<!--[if IE]><LINK rel=stylesheet type=text/css href="styles/defaultIE.css">{BEGIN IEcssFiles}<LINK rel=stylesheet type=text/css href="{$stylepathIE}">{END IEcssFiles}<![endif]-->

<META name=GENERATOR content="MSHTML 10.00.9200.16660"></HEAD>
C
cgphp 9/9/2013

Try to put the style block before the closing HEAD tag.

P
phpcmk author 9/9/2013



Try to put the style block before the closing HEAD tag.


Is it like the following? The result is still the same as mentioned in my previous post.
<HTML {$html_attrs}><HEAD><TITLE>{$pagetitle}</TITLE>

<META content=IE=7 http-equiv=X-UA-Compatible>

<META content="text/html; charset=utf-8" http-equiv=Content-Type><LINK rel=stylesheet type=text/css href="styles/default.css">{BEGIN rtlCSS}<LINK rel=stylesheet type=text/css href="styles/defaultRTL.css">{END rtlCSS}{BEGIN styleCSSFiles}<LINK rel=stylesheet type=text/css href="{$stylepath}">{END styleCSSFiles}{BEGIN pageCSSFiles}<LINK rel=stylesheet type=text/css href="{$pagestylepath}">{END pageCSSFiles}<!--[if IE]><LINK rel=stylesheet type=text/css href="styles/defaultIE.css">{BEGIN IEcssFiles}<LINK rel=stylesheet type=text/css href="{$stylepathIE}">{END IEcssFiles}<![endif]-->

<META name=GENERATOR content="MSHTML 10.00.9200.16660">

<style>

.runner-b-grid td {background: none !important;}

</style>

</HEAD>

C
cgphp 9/9/2013

Which version of PHPrunner are you using?

P
phpcmk author 9/9/2013



Which version of PHPrunner are you using?


PHPRunner Enterprise 6.2 (Build 13859)

C
cgphp 9/9/2013

Upgrade to the latest build (16275) and repeat the test.

P
phpcmk author 9/9/2013



Upgrade to the latest build (16275) and repeat the test.


ok I will try it out. Thanks.
Just a few questions on upgrading to the latest build. Not sure will it affects any code that is manually changed in a file.

  1. Do I need to uninstall all the PHPRunner first and then install the latest build? Or I just double click the latest build and the installation will overwrite the previous version?
  2. In some of my xxx.phpr files, I have manually changed the code (eg. <m_bEncryptPasswords>0</m_bEncryptPasswords> to <m_bEncryptPasswords>1</m_bEncryptPasswords>). Will the change I make revert back to the original code after upgrading?
  3. I have also made change to Program Files(x86)>PHPRunner6.2>source>classes>cipherer.php (eg. return " LIKE ".db_prepare_string("%".$value."%")<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=71997&image=1&table=forumreplies' class='bbc_emoticon' alt=';)' />, will the change be revert back to original code after upgrading?

Sergey Kornilov admin 9/9/2013
  1. Uninstall is not required
  2. Upgrade doesn't change your .phpr files
  3. You will have to apply all manual changes you made to source files again