CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> .NET

 Dynamic Cell Colour

Print topic Send  topic

Author Message
Abs
Posted: 09/01/2005, 7:21 AM

Hi,

I was wondering its possible to show different coloured cell in a grid depending on the data returned to that row?
dataobjx


Posts: 181
Posted: 09/01/2005, 11:02 AM

Yes it is possible.

In the first cell of the row, place a hidden cell named for instance, CSS.

Create a before show event and place the code you need to derive the indicators necessary to your idea.

For instance;
Dim intValue
intValue = MyGrid.DataSource.Recordset.Fields("field1")

Select Case intValue
Case 1
MyGrid.CSS.Value = "GrayAltDataTD"
Case 2
MyGrid.CSS.Value = "GrayFieldCaptionTD"
Case Else
MyGrid.CSS.Value = "GrayDataTD"
End Select

Then in the HTML of the page, locate the Cells for that Row... and replace the Class="GrayDataTD" to be Class="{CSS}"

That's all there is to it.


_________________
www.DataObjx.net
www.mydigitalapps.com
View profile  Send private message
Abs
Posted: 09/02/2005, 8:27 AM

Thanks, I will try it

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.

Web Database

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.