﻿<?xml version="1.0" encoding="utf-8"?><rss 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:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - CSS styles in webgrid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/CSS-styles-in-webgrid/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>CSS styles in webgrid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/CSS-styles-in-webgrid/</link><pubDate>Fri, 06 May 2011 04:09:30 GMT</pubDate><dc:creator>lili</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi Guillermo,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;There's a way to modify the Elegant CSS file:&lt;/p&gt;
&lt;p&gt;- First run the project. In IE, press F12 to show the Developer Tool window.&lt;/p&gt;
&lt;p&gt;- Choose the CSS tab, then pick the dropdown list that you can find the style like the above, such as WG5-F, etc.&lt;/p&gt;
&lt;p&gt;- Save the style and add the style to your project&lt;/p&gt;
&lt;p&gt;- You have to define the style in your ASPX page on the property that you change. See the attach screenshot and sample. &lt;/p&gt;
&lt;p&gt;- In the sample I changed the style for WG5-F, which is the property of FrameStyle in the LayoutSettings. Notice that I add this code in the LayoutSettings property.&lt;/p&gt;&lt;pre&gt;&amp;lt;FrameStyle CssClass="WG5-F"&amp;gt;
&amp;lt;/FrameStyle&amp;gt;&lt;/pre&gt;

&lt;p&gt;This way you can see the result that the frame of the WebGrid will change to red.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regarding the name of the CSS Class, usually we name it according to the property name in the LayoutSettings. For example:&lt;/p&gt;
&lt;p&gt;WG5-F : FrameStyle&lt;br /&gt;WG5-SBC-A : ScrollBarCommandStyle =&amp;gt; Active&lt;br /&gt;WG5-SBC-N : ScrollBarCommandStyle =&amp;gt; Normal&lt;br /&gt;WG5-SBC-O : ScrollBarCommandStyle =&amp;gt; Over&lt;br /&gt;WG5-GBB: GroupByBoxStyle&lt;br /&gt;WG5-GBBL: GroupByBox =&amp;gt; LabelStyle&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Hope it helps.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Lili Khiung&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>CSS styles in webgrid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/CSS-styles-in-webgrid/</link><pubDate>Thu, 05 May 2011 10:24:07 GMT</pubDate><dc:creator>Gmontes</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi Lili,&lt;/p&gt;&lt;p&gt;Thanks for your answer, the problem though is a little more detailed than that.&lt;/p&gt;
&lt;p&gt;See, I'm setting UserDefaultStyle = true and DefaultStyleMode = Elegant. If it turn the default style completely then I have to build it from scratch... if I use the default I'm somehow covered by whatever style you guys have already in there.&lt;/p&gt;
&lt;p&gt;The next step is just overriding whatever default definitions you set for the default styles with our colors... something like this:&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;.WG5-F {
	border-right: #c0c0c0 1px solid;
	border-top: #c0c0c0 1px solid;
	border-left: #c0c0c0 1px solid;
	border-bottom: #c0c0c0 1px solid;
	background-color: #525D8C;
	text-align: left;
}
.WG5-SBC-A {
	border-right: white 1px solid;
	border-top: white 1px solid;
	font-size: 12px;     /* GENOA - overridden */
	border-left: white 1px solid;
	border-bottom: white 1px solid;
	font-family: arial;
	color: white;
	background-color: #3e4464;
}
.WG5-SBC-O {
	border-right: white 1px solid;
	border-top: white 1px solid;
	font-size: 12px;     /* GENOA - overridden */
	border-left: white 1px solid;
	border-bottom: white 1px solid;
	font-family: arial;
	background-color: #3e4464;
	color: white;
}
.WG5-SBC-N {
	padding-right: 1px;
	padding-left: 1px;
	font-size: 11px;
	padding-bottom: 1px;
	padding-top: 1px;
	font-family: arial;
	background-color: #3e4464;
	color: white;
}
.WG5-GBB {
	background-color: #f4f4f4;
	text-align: left;
}
.WG5-GBBL {
	border-right: white 1px solid;
	border-top: white 1px solid;
	font-weight: normal;
	font-size: 11px;
	border-left: white 1px solid;
	border-bottom: white 1px solid;
	color: #1e2a63;
	text-align: left;
    font-family: arial;    
	background-color: #ced1e1;
}&lt;/pre&gt;&lt;pre&gt;... More&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;My problem is... I don't know what exactly were those styles originaly, this is something I built using the IE Dev toolbar. And it works... for most of the cases, when the layouts get more complex it gets tricky because padding and borders don't always match.&lt;/p&gt;
&lt;p&gt;So... my question is again, would it be possible to get a copy of your css file for the Elegant style to know exactly what I can modify and what I can't?&lt;/p&gt;</description></item><item><title>CSS styles in webgrid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/CSS-styles-in-webgrid/</link><pubDate>Thu, 05 May 2011 02:00:55 GMT</pubDate><dc:creator>lili</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi Guillermo,&lt;/p&gt;
&lt;p&gt;You could try to set the UseDefaultStyle to False and then add your own CSS file in the LayoutSettings to make a different style for the WebGrid.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Lili Khiung&lt;/p&gt;</description></item><item><title>CSS styles in webgrid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/CSS-styles-in-webgrid/</link><pubDate>Wed, 04 May 2011 11:11:15 GMT</pubDate><dc:creator>Gmontes</dc:creator><category>WebGrid</category><description>&lt;p /&gt;
&lt;p&gt;Would it be possible to get a full definition any ANY css style to override? It's much simpler to just add a css files that rewrites a native definition that webgrid uses, than going behind scenes wiring custom styles to specific grid needs that don't always fit.&lt;/p&gt;
&lt;p&gt;I've reversed engineered some of them but when it comes to borders and padding it gets tricky. I think you know what I mean: What would the official definition for the WG5-F, WG5-AR, W5G-RH (and so on) be for say... the Elegant style (Black or Standard or any other for that matter)?&lt;/p&gt;
&lt;p&gt;That would be make customization much simpler.&lt;/p&gt;
&lt;p /&gt;</description></item></channel></rss>