NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on March 04, 2009, 05:00:52 PM

Title: How to change the color of a cell in a browse?
Post by: Alberto on March 04, 2009, 05:00:52 PM
Hi,
How can I change the color of an individual cell in a browse depending on the cell value or another field value?

Thanks
Alberto


Title: Re: How to change the color of a cell in a browse?
Post by: kevin plummer on March 04, 2009, 08:13:17 PM
Set the CSS class as a variable and update the variable depending on your changed condition. I think you would need to reset the browse if you wanted to do it dynamically. I've done it before but only on a form.

Title: Re: How to change the color of a cell in a browse?
Post by: Alberto on March 05, 2009, 02:53:31 AM
Hi,
I need to do it dinamically, I need each cell tohave its own css.
The table I am browsing has the data of each cell and the css of each cell.
I´ve tried the following:

Set the Custom CSS Class of the column, to the field which has the css of the cell.

But it does not work.

Any idea?

Thanks
Alberto
Title: Re: How to change the color of a cell in a browse?
Post by: kevin plummer on March 05, 2009, 04:04:03 AM
I think you would be restricted to dynamically changing the css per column
Title: Re: How to change the color of a cell in a browse?
Post by: Alberto on March 05, 2009, 07:29:28 AM
OK, ok, I´m not familiar and dont know how to use the CSS classes.
I check the souce HTML code of my page with firebug and its all ok, the css are there, one for each cell but I dont see any change.
I´ve opened the all.css, found  .Navy, .Yellow, etc and want to use it to get a Navy cell, a Yellow cell, etc
In the CSS class, First I used  '.Navy'  and nothing, then tried  'Navy' and nothing.
How does it works?

Thanks
Alberto
Title: Re: How to change the color of a cell in a browse?
Post by: kevin plummer on March 05, 2009, 02:18:59 PM
You need to look at the NT docs to really understand how it works but here is a quick overview. Although I think Bruce had some really good notes in one of his conferences manuals which aren't in the NT docs that I used to get started.

1) don't change Bruces CSS files as 1, they will be overwritten when you load on a new web folder with a new release and 2, the files are compressed so every time you make a change you need to compress them again.

2) create a new css file in notepad, save into the styles folder and then add this file to the NT global setting template

3) If you want to change an effect just copy from the all.css into your new css file and modify it. I tend to rename them.

4) If you want an effect which does not exist, copy something similar from the all.css and modify it

Use firebug to look at the CSS file settings.

Also, do a search on this newsgroup for CSS as I'm sure you will find some other useful information. Also, use google to find how to do things.

It is pretty frustrating when you first start doing it, but once you get the hang of it, it is pretty powerful stuff. I was going to pay to get a CSS guru in but ended up doing it myself and I'm glad I did as I don't have to rely on someone else to tweak my app.

I think in my current app I have changed almost every css element to get the look and feel I want. It's making my earlier app look pretty ugly now...

HTH's

Title: Re: How to change the color of a cell in a browse?
Post by: Bruce on March 05, 2009, 10:32:06 PM
there's a thread in the "share knowledge" forum on this as well.

Cheers
Bruce