Forums

This topic is locked

set cell background colour based on record value

Posted 20 Dec 2001 02:19:49
1
has voted
20 Dec 2001 02:19:49 Martin Cooney posted:
Hi All,

This may well be a basic question but I'm relatively new to Ultradev.

I want to set the background colour of a cell based on the return value of a record (either Yes or No). If Yes, set colour to one colour and if No, set it differently.

Is this easily done through a behaviour or do I need to invest time in some ASP coding and dive into the Code window (which I don't fancy doing at this stage <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> )

Cheers and thanks for any help

Replies

Replied 20 Dec 2001 09:20:36
20 Dec 2001 09:20:36 Viktor Farcic replied:
Find code that looks like:
&lt;td bgcolor="#996600"&gt;SomeText&lt;/td&gt;

And change it to:
&lt;td bgcolor=
&lt;% If RecordserName("FieldName" = 1 Then %&gt;
"#996600"
&lt;% ElseIf RecordserName("FieldName" = 0 Then %&gt;
"#006699"
&lt;% End If %&gt;
&gt;SomeText&lt;/td&gt;


<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi All,

This may well be a basic question but I'm relatively new to Ultradev.

I want to set the background colour of a cell based on the return value of a record (either Yes or No). If Yes, set colour to one colour and if No, set it differently.

Is this easily done through a behaviour or do I need to invest time in some ASP coding and dive into the Code window (which I don't fancy doing at this stage <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> )

Cheers and thanks for any help


<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager

Reply to this topic