<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
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/"
> <channel><title>Comments on: ASP.NET C# Change GridView Cell Background Color Based on Value</title> <atom:link href="http://www.sharepointjohn.com/asp-net-c-change-gridview-cell-background-color-based-on-value/feed/" rel="self" type="application/rss+xml" /><link>http://www.sharepointjohn.com/asp-net-c-change-gridview-cell-background-color-based-on-value/</link> <description></description> <lastBuildDate>Fri, 03 Feb 2012 10:33:36 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>By: grievesy</title><link>http://www.sharepointjohn.com/asp-net-c-change-gridview-cell-background-color-based-on-value/#comment-3243</link> <dc:creator>grievesy</dc:creator> <pubDate>Sat, 28 Jan 2012 21:25:07 +0000</pubDate> <guid
isPermaLink="false">http://www.sharepointjohn.com/?p=374#comment-3243</guid> <description>I have something similar working for text forecolor.. But it doesnt seem to work on iPhone.  Has anyone else noticed the problem?  iPad seems fine.
Cheers</description> <content:encoded><![CDATA[<p>I have something similar working for text forecolor.. But it doesnt seem to work on iPhone.  Has anyone else noticed the problem?  iPad seems fine.<br
/> Cheers</p> ]]></content:encoded> </item> <item><title>By: bartek4c</title><link>http://www.sharepointjohn.com/asp-net-c-change-gridview-cell-background-color-based-on-value/#comment-3235</link> <dc:creator>bartek4c</dc:creator> <pubDate>Mon, 16 Jan 2012 11:15:55 +0000</pubDate> <guid
isPermaLink="false">http://www.sharepointjohn.com/?p=374#comment-3235</guid> <description>Hi,I was trying to implement this example in my project and have some problems. Could you please help me by any chance? I am using the datasource and databind  method  to fill my gridview with data. Does it mean I can&#039;t use your technique?my code is:...
dapter.Fill(ds, &quot;projects&quot;);
grdProjects.DataSource = ds;
grdProjects.DataBind();
grdProjects.RowDataBound += new GridViewRowEventHandler(grdProjects_RowDataBound);
con.Close();but the grdProjects_RowDataBound is not being firedAny idea why?Thanks,Bartosz</description> <content:encoded><![CDATA[<p>Hi,</p><p>I was trying to implement this example in my project and have some problems. Could you please help me by any chance? I am using the datasource and databind  method  to fill my gridview with data. Does it mean I can&#8217;t use your technique?</p><p>my code is:</p><p>&#8230;<br
/> dapter.Fill(ds, &#8220;projects&#8221;);<br
/> grdProjects.DataSource = ds;<br
/> grdProjects.DataBind();<br
/> grdProjects.RowDataBound += new GridViewRowEventHandler(grdProjects_RowDataBound);<br
/> con.Close();</p><p>but the grdProjects_RowDataBound is not being fired</p><p>Any idea why?</p><p>Thanks,</p><p>Bartosz</p> ]]></content:encoded> </item> <item><title>By: Narendran</title><link>http://www.sharepointjohn.com/asp-net-c-change-gridview-cell-background-color-based-on-value/#comment-3232</link> <dc:creator>Narendran</dc:creator> <pubDate>Thu, 12 Jan 2012 06:41:33 +0000</pubDate> <guid
isPermaLink="false">http://www.sharepointjohn.com/?p=374#comment-3232</guid> <description>THANKS A LOT, IT HELPS A MORE.Narendran
Tweet me @MyNaren</description> <content:encoded><![CDATA[<p>THANKS A LOT, IT HELPS A MORE.</p><p>Narendran<br
/> Tweet me @MyNaren</p> ]]></content:encoded> </item> <item><title>By: Pravesh Singh</title><link>http://www.sharepointjohn.com/asp-net-c-change-gridview-cell-background-color-based-on-value/#comment-3231</link> <dc:creator>Pravesh Singh</dc:creator> <pubDate>Thu, 05 Jan 2012 14:32:51 +0000</pubDate> <guid
isPermaLink="false">http://www.sharepointjohn.com/?p=374#comment-3231</guid> <description>Very informative post. It&#039;s really helpful for me and helped me lot to complete my task.Thanks for sharing with us. I had found another nice post over the internet which wasalso explained very well about GridView Decoration in ASP.Net, formore details of this post check out this link...http://mindstick.com/Articles/0efe2da6-407e-4442-a675-475bd6f8a2d7/?GridView%20Decoration%20in%20ASP.NetThanks</description> <content:encoded><![CDATA[<p>Very informative post. It&#8217;s really helpful for me and helped me lot to complete my task.</p><p>Thanks for sharing with us. I had found another nice post over the internet which was</p><p>also explained very well about GridView Decoration in ASP.Net, for</p><p>more details of this post check out this link&#8230;</p><p><a
href="http://mindstick.com/Articles/0efe2da6-407e-4442-a675-475bd6f8a2d7/?GridView%20Decoration%20in%20ASP.Net" >http://mindstick.com/Articles/0efe2da6-407e-4442-a675-475bd6f8a2d7/?GridView%20Decoration%20in%20ASP.Net</a></p><p>Thanks</p> ]]></content:encoded> </item> <item><title>By: John Chapman</title><link>http://www.sharepointjohn.com/asp-net-c-change-gridview-cell-background-color-based-on-value/#comment-276</link> <dc:creator>John Chapman</dc:creator> <pubDate>Fri, 16 Sep 2011 17:50:21 +0000</pubDate> <guid
isPermaLink="false">http://www.sharepointjohn.com/?p=374#comment-276</guid> <description>Yes, this is from the server side.  You could go either way, depends on the needs at hand.  Doing it on the client side requires additional scripts to load and run in the web browser, whereas a server-side solution does it before its sent to the client.</description> <content:encoded><![CDATA[<p>Yes, this is from the server side.  You could go either way, depends on the needs at hand.  Doing it on the client side requires additional scripts to load and run in the web browser, whereas a server-side solution does it before its sent to the client.</p> ]]></content:encoded> </item> <item><title>By: shevi</title><link>http://www.sharepointjohn.com/asp-net-c-change-gridview-cell-background-color-based-on-value/#comment-262</link> <dc:creator>shevi</dc:creator> <pubDate>Fri, 16 Sep 2011 06:09:02 +0000</pubDate> <guid
isPermaLink="false">http://www.sharepointjohn.com/?p=374#comment-262</guid> <description>Good post.. but its from server-side, isn&#039;t it.
You can do it in client side and reduce the weight on server
its too easy with JavaScript. I found this in a blog site
http://howsharepoint.blogspot.com/2011/09/javascript-to-color-gridview-cells.html</description> <content:encoded><![CDATA[<p>Good post.. but its from server-side, isn&#8217;t it.<br
/> You can do it in client side and reduce the weight on server<br
/> its too easy with JavaScript. I found this in a blog site<br
/> <a
href="http://howsharepoint.blogspot.com/2011/09/javascript-to-color-gridview-cells.html" >http://howsharepoint.blogspot.com/2011/09/javascript-to-color-gridview-cells.html</a></p> ]]></content:encoded> </item> <item><title>By: Stu</title><link>http://www.sharepointjohn.com/asp-net-c-change-gridview-cell-background-color-based-on-value/#comment-121</link> <dc:creator>Stu</dc:creator> <pubDate>Thu, 31 Mar 2011 14:13:57 +0000</pubDate> <guid
isPermaLink="false">http://www.sharepointjohn.com/?p=374#comment-121</guid> <description>Nice job of presenting a very useful feature. I code in VB and have figured the differences for all the code except what you show in your line 01.I&#039;m not sure where I would put that line in my code-behind or if in VB I even need it. I have the rest of the code written and it proves to be ok but I get the following error whenever I run the code. System.Data.DataRowView does not contain a property with the name &#039;RfS&#039;. &quot;RfS&quot; is the text that is in the cell that the code should be setting the format for.The only consideration that I can see that might make a difference is that the DataSource for the GridView is created and assigned with a DataTable at the Page_Load of this page.Any ideas would sure be appreciated.Thanks again for your sample.</description> <content:encoded><![CDATA[<p>Nice job of presenting a very useful feature. I code in VB and have figured the differences for all the code except what you show in your line 01.</p><p>I&#8217;m not sure where I would put that line in my code-behind or if in VB I even need it. I have the rest of the code written and it proves to be ok but I get the following error whenever I run the code. System.Data.DataRowView does not contain a property with the name &#8216;RfS&#8217;. &#8220;RfS&#8221; is the text that is in the cell that the code should be setting the format for.</p><p>The only consideration that I can see that might make a difference is that the DataSource for the GridView is created and assigned with a DataTable at the Page_Load of this page.</p><p>Any ideas would sure be appreciated.</p><p>Thanks again for your sample.</p> ]]></content:encoded> </item> <item><title>By: J Morris</title><link>http://www.sharepointjohn.com/asp-net-c-change-gridview-cell-background-color-based-on-value/#comment-120</link> <dc:creator>J Morris</dc:creator> <pubDate>Fri, 06 Aug 2010 19:43:07 +0000</pubDate> <guid
isPermaLink="false">http://www.sharepointjohn.com/?p=374#comment-120</guid> <description>Thanks!  I will try it out.</description> <content:encoded><![CDATA[<p>Thanks!  I will try it out.</p> ]]></content:encoded> </item> <item><title>By: John Chapman</title><link>http://www.sharepointjohn.com/asp-net-c-change-gridview-cell-background-color-based-on-value/#comment-119</link> <dc:creator>John Chapman</dc:creator> <pubDate>Fri, 06 Aug 2010 17:43:39 +0000</pubDate> <guid
isPermaLink="false">http://www.sharepointjohn.com/?p=374#comment-119</guid> <description>string value = DataBinder.Eval(e.Row.DataItem, e.Row.Cells[2].Text);if (value == &quot;some string&quot;)
{}You might have to add ToString() at the end if it doesn&#039;t work automatically: string value = DataBinder.Eval(e.Row.DataItem, e.Row.Cells[2].Text).ToString();</description> <content:encoded><![CDATA[<p>string value = DataBinder.Eval(e.Row.DataItem, e.Row.Cells[2].Text);</p><p>if (value == &#8220;some string&#8221;)<br
/> {</p><p>}</p><p>You might have to add ToString() at the end if it doesn&#8217;t work automatically: string value = DataBinder.Eval(e.Row.DataItem, e.Row.Cells[2].Text).ToString();</p> ]]></content:encoded> </item> <item><title>By: J Morris</title><link>http://www.sharepointjohn.com/asp-net-c-change-gridview-cell-background-color-based-on-value/#comment-118</link> <dc:creator>J Morris</dc:creator> <pubDate>Fri, 06 Aug 2010 17:39:05 +0000</pubDate> <guid
isPermaLink="false">http://www.sharepointjohn.com/?p=374#comment-118</guid> <description>How would you code the page if you were using a String value in the Column cell?</description> <content:encoded><![CDATA[<p>How would you code the page if you were using a String value in the Column cell?</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Served from: www.sharepointjohn.com @ 2012-02-06 02:39:50 by W3 Total Cache -->
