Cell styling but not loosing AltRow color

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
cruzz
User
Posts: 34
Location: Montreal - Canada

Cell styling but not loosing AltRow color

Post by cruzz »

HI

There is any way to Customize CELL color background without losing the Alter row effect?

			$this->Per_Taken->CellCssStyle = "background-color: #bcd6c0; border-color: #fff;";  
			$this->PER_Bal->CellCssStyle = "background-color: #bcd6c0; border-color: #fff;";  
			$this->Per_Reserve->CellCssStyle = "background-color: #bcd6c0; border-color: #fff;"; 
			$this->Per_Total_This_Year->CellCssStyle = "background-color: #bcd6c0; border-color: #fff;";  
			$this->Per_Total_Next_Year->CellCssStyle = "background-color: #bcd6c0; border-color: #fff;";  
			$this->Per_Total_last_Year->CellCssStyle = "background-color: #bcd6c0; border-color: #fff;"; 

After use that this columns have not the rollover effect

Thanks :)


mobhar
User
Posts: 11756

Post by mobhar »

Make sure your hover color is not #bcd6c0.


danielc
User
Posts: 1601

Post by danielc »

To preserve alternate row color, you need to check the record count in list page. Add the condition check for your css style in Row_Rendered server event:

if ($this->RecCnt % 2 <> 0) { // only apply the css style to alternate row
// set your css style
}


cruzz
User
Posts: 34
Location: Montreal - Canada

Post by cruzz »

Hi! thanks for the tips...

I fixed the altRow with

if ($this->RecCnt % 2 <> 0) { // only apply the css style to alternate row
// set your css style
}

But what about the ROLLOver effect?... I want to preserve the effect when i am moving the mouse over the different rows.. mouseover.. mouseout and click events are disabled for these columns where I modify the style..

what i can do?

Thanks


danielc
User
Posts: 1601

Post by danielc »

For mouseover/mouseout effect, you can reference function ew_MouseOver/ew_MouseOut/ew_SetupTable in ewp10.js (locate at phpjs subfolder).

Then, you modify the above function to get what you want.


Webmaster
User
Posts: 9430

Post by Webmaster »

Style attribute is more specific than class atttribute, so your styles override the row color class. You can use CellCssClass instead of CellCssStyle. Add your class in HTML -> Styles tab and then set your CSS class in the server event.


Post Reply