<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sharepoint Server &#187; XSL</title>
	<atom:link href="http://www.fivenumber.com/tag/xsl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fivenumber.com</link>
	<description>It&#039;s all about SharePoint</description>
	<lastBuildDate>Tue, 03 Jan 2012 16:33:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<image>
<link>http://www.fivenumber.com</link>
<url>http://www.fivenumber.com/wp-content/mbp-favicon/5.jpg</url>
<title>Sharepoint Server</title>
</image>
		<item>
		<title>Sharepoint: Apply background color to custom list column based on other column value</title>
		<link>http://www.fivenumber.com/sharepoint-apply-background-color-to-custom-list-column-based-on-other-column-value/</link>
		<comments>http://www.fivenumber.com/sharepoint-apply-background-color-to-custom-list-column-based-on-other-column-value/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 07:12:50 +0000</pubDate>
		<dc:creator>GVK</dc:creator>
				<category><![CDATA[MOSS - Customization with SPD]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Sharepoint Designer]]></category>
		<category><![CDATA[XSL]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=450</guid>
		<description><![CDATA[Today we are going to learn how to apply the background color to a custom list column based on other column value, firstly, I tried this scenario using calculated formula column type but some javascript code is needed to render the background color based on calculated formula value,  so I did some research and come [...]]]></description>
			<content:encoded><![CDATA[<p>Today we are going to learn how to apply the background color to a custom list column based on other column value, firstly, I tried this scenario using calculated formula column type but some javascript code is needed to render the background color based on calculated formula value,  so I did some research and come up with the best easy way&#8230;..</p>
<p><strong>STEPS:</strong></p>
<p>I have created a simple custom list and name it as &#8216;<strong>My List</strong>&#8216;</p>
<p>Modified the &#8216;<strong>Title</strong>&#8216; column name as &#8216;<strong>Student Name</strong>&#8216;</p>
<p>Created one more column &#8216;<strong>Subject</strong>&#8216; which is of type <em>single line text</em></p>
<p>Also, created one column &#8216;<strong>Marks</strong>&#8216; which is of type <em>Number </em>min is 1 and max is 100</p>
<p>Open the <strong>AllItems.aspx</strong> page using <strong>Sharepoint Designer 2007</strong></p>
<p>Select the list, right click and <strong>Convert into XSLT</strong> mode</p>
<p>Write the XSL condition in between the &#8216;<strong>Subject</strong>&#8216; <strong>TD</strong> tag as show in the below image</p>
<p>Here goes the XSL code&#8230;&#8230;</p>
<p><em>&lt;!&#8211;custom code for background color starts&#8211;&gt;</em></p>
<p><strong>&lt;xsl:choose&gt;<br />
&lt;xsl:when test=&#8221;@Marks &amp;gt;=&#8217;70&#8242;&#8221;&gt;<br />
&lt;xsl:attribute name=&#8221;style&#8221;&gt;background-color:Green;&lt;/xsl:attribute&gt;<br />
&lt;/xsl:when&gt;<br />
&lt;xsl:when test=&#8221;@Marks &amp;lt;=&#8217;70&#8242; and @Marks &amp;gt;=&#8217;50&#8242;&#8221;&gt;<br />
&lt;xsl:attribute name=&#8221;style&#8221;&gt;background-color:Yellow;&lt;/xsl:attribute&gt;<br />
&lt;/xsl:when&gt;<br />
&lt;xsl:otherwise&gt;<br />
&lt;xsl:attribute name=&#8221;style&#8221;&gt;background-color:Red;&lt;/xsl:attribute&gt;<br />
&lt;/xsl:otherwise&gt;<br />
&lt;/xsl:choose&gt;</strong></p>
<div id="attachment_485" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2009/07/21.gif" rel="lightbox[450]"><img class="size-medium wp-image-485" title="XSL condition in Sharepoint Designer 2007" src="http://www.fivenumber.com/wp-content/uploads/2009/07/21-300x206.gif" alt="XSL condition in Sharepoint Designer 2007" width="300" height="206" /></a><p class="wp-caption-text">XSL condition in Sharepoint Designer 2007</p></div>
<p><strong>Output</strong>:</p>
<div id="attachment_486" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2009/07/11.gif" rel="lightbox[450]"><img class="size-medium wp-image-486" title="Background color to Sharepoint Custom List column based on Marks" src="http://www.fivenumber.com/wp-content/uploads/2009/07/11-300x173.gif" alt="Background color to Sharepoint Custom List column based on Marks" width="300" height="173" /></a><p class="wp-caption-text">Background color to Sharepoint Custom List column based on Marks</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/sharepoint-apply-background-color-to-custom-list-column-based-on-other-column-value/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

