<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Data Presentation Controls</title><link>http://forums.asp.net/24.aspx</link><description>ASP.NET data-bound controls such as the DataGrid, DataList, GridView, FormView, DetailsView, and Repeater Controls.  &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=23&amp;c=17" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Styling the GridView</title><link>http://forums.asp.net/thread/3216855.aspx</link><pubDate>Mon, 08 Jun 2009 05:59:08 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3216855</guid><dc:creator>prashant_1312</dc:creator><author>prashant_1312</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3216855.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=3216855</wfw:commentRss><description>&lt;p&gt;Thanks for GridView styles ED,

&lt;/p&gt;&lt;p&gt;from,&lt;/p&gt;&lt;p&gt;Prashant_1312
sr. web desinger,
cnpl, mumbai.&lt;/p&gt;</description></item><item><title>Re: Styling the GridView</title><link>http://forums.asp.net/thread/1426529.aspx</link><pubDate>Thu, 12 Oct 2006 13:33:39 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1426529</guid><dc:creator>stuckish</dc:creator><author>stuckish</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1426529.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1426529</wfw:commentRss><description>Thanx for this tips!</description></item><item><title>Re: Styling the GridView</title><link>http://forums.asp.net/thread/1321030.aspx</link><pubDate>Wed, 21 Jun 2006 18:40:56 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1321030</guid><dc:creator>amrinders87</dc:creator><author>amrinders87</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1321030.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1321030</wfw:commentRss><description>Well, the rowstyle defines the style for the tr but I need to style the td. I know how do specify the class for the td but I have to do it for everty node in columns.&lt;br /&gt;&lt;br /&gt;I was able to solve this issue in my css file. I first specified a css class for RowStyle and AlternatingRowStyle. Then in the css I created a new style like this&lt;br /&gt;&lt;br /&gt;.GridViewRowStyle td, .GridViewAlternatingRowStyle td&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* style for the td*/&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The reason I wanted to this was because the way asp.net renders the GridView, it does not look the same in all browsers. So I wanted to skin it using pure css so it would look the same in all browsers and now it does. Below is the css code and the skin code that I used if anyone else is having this issue.&lt;br /&gt;&lt;br /&gt;.GridViewStyle&lt;br /&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-right: 2px solid #A7A6AA;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-bottom: 2px solid #A7A6AA;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-left: 2px solid white;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-top: 2px solid white;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding: 4px;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.GridViewStyle a&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #FFFFFF;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.GridViewHeaderStyle th&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-left: 1px solid #EBE9ED;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-right: 1px solid #EBE9ED;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.GridViewHeaderStyle&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #5D7B9D;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-weight: bold;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: White;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.GridViewFooterStyle&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #5D7B9D;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-weight: bold;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: White;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.GridViewRowStyle&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #F7F6F3;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #333333;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.GridViewAlternatingRowStyle &lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #FFFFFF;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #284775;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.GridViewRowStyle td, .GridViewAlternatingRowStyle td&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border: 1px solid #EBE9ED;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.GridViewSelectedRowStyle&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #E2DED6;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-weight: bold;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #333333;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.GridViewPagerStyle&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #284775;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #FFFFFF;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.GridViewPagerStyle table /* to center the paging links*/&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; margin: 0 auto 0 auto;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Skin file:&lt;br /&gt;&amp;lt;asp:GridView CssClass="GridViewStyle" runat="server" &amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;FooterStyle CssClass="GridViewFooterStyle" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RowStyle CssClass="GridViewRowStyle" /&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SelectedRowStyle CssClass="GridViewSelectedRowStyle" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;PagerStyle CssClass="GridViewPagerStyle" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;HeaderStyle CssClass="GridViewHeaderStyle" /&amp;gt;&lt;br /&gt;&amp;lt;/asp:GridView&amp;gt;&lt;br /&gt;</description></item><item><title>Re: Styling the GridView</title><link>http://forums.asp.net/thread/1321022.aspx</link><pubDate>Wed, 21 Jun 2006 18:31:45 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1321022</guid><dc:creator>ecbruck</dc:creator><author>ecbruck</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1321022.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1321022</wfw:commentRss><description>&lt;p&gt;Doesn't GridView.RowStyle accomplish the same thing?&amp;nbsp;If all of the items in a row are formatted the same, then I would just set class of the &amp;lt;RowStyle&amp;gt; tag as so:&amp;nbsp;&lt;/p&gt;&lt;pre class=coloredcode&gt;&amp;lt;&lt;span class=tag&gt;asp:gridview&lt;/span&gt;&lt;span class=attr&gt; runat=&lt;/span&gt;&lt;span class=attrv&gt;"server"&lt;/span&gt;&lt;span class=attr&gt; cellpadding=&lt;/span&gt;&lt;span class=attrv&gt;"5"&lt;/span&gt;&lt;span class=attr&gt; cssclass=&lt;/span&gt;&lt;span class=attrv&gt;"GridView"&lt;/span&gt;&lt;span class=attr&gt; gridlines=&lt;/span&gt;&lt;span class=attrv&gt;"None"&lt;/span&gt;&amp;gt;
	&amp;lt;&lt;span class=tag&gt;headerstyle&lt;/span&gt;&lt;span class=attr&gt; cssclass=&lt;/span&gt;&lt;span class=attrv&gt;"GridViewHeader"&lt;/span&gt;&lt;span class=attr&gt; forecolor=&lt;/span&gt;&lt;span class=attrv&gt;"#ffffff"&lt;/span&gt;&lt;span class=attr&gt; verticalalign=&lt;/span&gt;&lt;span class=attrv&gt;"Bottom"&lt;/span&gt; /&amp;gt;
	&lt;font color=#ff0000&gt;&amp;lt;&lt;span class=tag&gt;rowstyle&lt;/span&gt;&lt;span class=attr&gt; cssclass=&lt;/span&gt;&lt;span class=attrv&gt;"GridViewRow"&lt;/span&gt;&lt;span class=attr&gt; verticalalign=&lt;/span&gt;&lt;span class=attrv&gt;"Top"&lt;/span&gt; /&amp;gt;&lt;/font&gt;
	&amp;lt;&lt;span class=tag&gt;alternatingrowstyle&lt;/span&gt;&lt;span class=attr&gt; cssclass=&lt;/span&gt;&lt;span class=attrv&gt;"GridViewAlternatingRow"&lt;/span&gt;&lt;span class=attr&gt; verticalalign=&lt;/span&gt;&lt;span class=attrv&gt;"Top"&lt;/span&gt; /&amp;gt;
	&amp;lt;&lt;span class=tag&gt;editrowstyle&lt;/span&gt;&lt;span class=attr&gt; cssclass=&lt;/span&gt;&lt;span class=attrv&gt;"GridViewEditRow"&lt;/span&gt;&lt;span class=attr&gt; verticalalign=&lt;/span&gt;&lt;span class=attrv&gt;"Top"&lt;/span&gt; /&amp;gt;
	&amp;lt;&lt;span class=tag&gt;selectedrowstyle&lt;/span&gt;&lt;span class=attr&gt; cssclass=&lt;/span&gt;&lt;span class=attrv&gt;"GridViewSelectedRow"&lt;/span&gt;&lt;span class=attr&gt; verticalalign=&lt;/span&gt;&lt;span class=attrv&gt;"Top"&lt;/span&gt; /&amp;gt;
	&amp;lt;&lt;span class=tag&gt;footerstyle&lt;/span&gt;&lt;span class=attr&gt; cssclass=&lt;/span&gt;&lt;span class=attrv&gt;"GridViewFooter"&lt;/span&gt; /&amp;gt;
	&amp;lt;&lt;span class=tag&gt;pagerstyle&lt;/span&gt;&lt;span class=attr&gt; cssclass=&lt;/span&gt;&lt;span class=attrv&gt;"GridViewPager"&lt;/span&gt; /&amp;gt;
&amp;lt;/&lt;span class=tag&gt;asp:gridview&lt;/span&gt;&amp;gt;&lt;/pre&gt;&amp;nbsp;If you're wanting to format the BoundFields differently than the TemplateFields then I don't know.</description></item><item><title>Styling the GridView</title><link>http://forums.asp.net/thread/1320959.aspx</link><pubDate>Wed, 21 Jun 2006 17:32:18 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1320959</guid><dc:creator>amrinders87</dc:creator><author>amrinders87</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1320959.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1320959</wfw:commentRss><description>Is there anyway to set the BoundField's ItemStyle-CssClass using Skin file? Because now I have to set it in my aspx page for each &amp;lt;asp:BoundField ItemStyle-CssClass="className"...&lt;br /&gt;&lt;br /&gt;But how can I specify it in the Skin file so I dont have to do it for each BoundField of every GridView?&lt;br /&gt;</description></item></channel></rss>