CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 row coloring

Print topic Send  topic

Author Message
gary
Posted: 08/23/2004, 10:30 AM

Has anyone figured out how to conditionally color a row?

Prior to ASP.NET I did this via the BeforeShowRow event...

' -------------------------
if (CCParseInteger( CCGetParam("CategoryID", Empty), "" ) = tblServiceCateg.Recordset.Fields("CategoryID")) then
tblServiceCateg.TemplateBlock.Block("Row").Variable("color") = "#E4E4E4" ' select color (med grey)
else
tblServiceCateg.TemplateBlock.Block("Row").Variable("color") = "WhiteSmoke" ' default color (lt grey)
end if
' -------------------------

but I can't figure out the equivalent in .NET. Any help is much appreciated...

gary
E43509

Posts: 283
Posted: 08/23/2004, 11:13 AM

I'm not by my machine to give you code one approach to take is to add a runat=server to the table so you can now programmatically call get at HTMLTable Control.
View profile  Send private message
gary
Posted: 08/23/2004, 1:27 PM

Much thanks for the reply....any chance fo getting a code snippit once you get back to your machine? When it comes to .NET, it gives a whole new meaning to the phrase "devil in the details"...

gary
Shawn Mason
Posted: 08/24/2004, 7:23 PM

in your HTML

<td id="CreditorAlt" runat="server" class="FoggyDayAltDataTD">

then you can refer to the <td> element (or you can do this for a <tr> or any
other html control) in code.

HTH,

Shawn Mason


"gary" <gary@forum.codecharge> wrote in message
news:8412a29a249868@news.codecharge.com...
> Has anyone figured out how to conditionally color a row?
>
> Prior to ASP.NET I did this via the BeforeShowRow event...
>
> ' -------------------------
> if (CCParseInteger( CCGetParam("CategoryID", Empty), "" ) =
> tblServiceCateg.Recordset.Fields("CategoryID")) then
> tblServiceCateg.TemplateBlock.Block("Row").Variable("color") = "#E4E4E4" '
> select color (med grey)
> else
> tblServiceCateg.TemplateBlock.Block("Row").Variable("color") =
"WhiteSmoke" '
> default color (lt grey)
> end if
> ' -------------------------
>
> but I can't figure out the equivalent in .NET. Any help is much
> appreciated...
>
> gary
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

dataobjx


Posts: 181
Posted: 08/25/2004, 9:22 AM

You can go to http://www.dataobjx.net, register and download the first issue of CCS Developer Magazine and source code for the articles for FREE.

The article on Dynamically Formatting Row Colors demonstrates a technique for achieving this.
_________________
www.DataObjx.net
www.mydigitalapps.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.