Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Sun, 12 Feb 2006 13:57:27 -0800,    group: microsoft.public.inetsdk.html_authoring        back       


CSS TD Tags   
I have an ASP.NET DataGrid, in which I would like to implement Conditional 
Formatting. I have figured out how to do this, insofar as the proper DataGrid 
tags:
....  OnItemDataBound="ItemDataBoundEventHandler">, along with the 
EventHandler:

Sub ItemDataBoundEventHandler(sender as Object, e as DataGridItemEventArgs)
   
      Dim cqi as Integer
      cqi = (DataBinder.Eval(e.Item.DataItem, "Score"))
      
      If cqi < 80 then
          e.Item.CssClass = "cqi"
      Else
          e.Item.CssClass = "passing"
      End If
   
End Sub

I have linked my page to an external CSS Sheet, in which I have:
body
{
	font-weight: bold;
	color: #FFFFCC;
	font-family: Arial;
	background-color: black;
}
TD
{
	font-weight: bold;
	color: #FFFFCC;
	font-family: Verdana;
        font-size: 10pt;
	background-color: black;
}
..cqi
{
	font-weight: bold;
	font-size: 10pt;
	color: red;
	font-family: Verdana;
	background-color: black;
}
..passing
{
	font-weight: bold;
	font-size: 10pt;
	color: #FFFFCC;
	font-family: Verdana;
	background-color: black;
}
This only works, however, when I remove the TD Style, in the above CSS 
Sheet. The result, when I remove the TD Style, is that the DataGrid column 
headings, along with Scores that are less than 80, are highlighted in Red, 
which is what I want. However, when I put the "TD" sytle tags back into my 
CSS Sheet, it does not work. I want to keep my "TD" Sytle tags. What should I 
do?
date: Sun, 12 Feb 2006 13:57:27 -0800   author:   Juan G.

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us