﻿<?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 - Html-formatted column headers and context menu</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Html-formatted-column-headers-and-context-menu/</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>Html-formatted column headers and context menu</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Html-formatted-column-headers-and-context-menu/</link><pubDate>Tue, 20 Oct 2009 04:35:37 GMT</pubDate><dc:creator>yudi</dc:creator><category>WebGrid</category><description>&lt;blockquote&gt;&lt;p&gt;Thank you, Yudi, this last suggestion with the "!important" statement worked.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;You are very welcome, but I guess that your compliment should be addressed to “James”.&lt;br /&gt;Glad to hear that James’s suggestion worked.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Thank you for your contribution, James.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Html-formatted column headers and context menu</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Html-formatted-column-headers-and-context-menu/</link><pubDate>Tue, 20 Oct 2009 04:02:59 GMT</pubDate><dc:creator>dasha.fedorova@gmail.com</dc:creator><category>WebGrid</category><description>&lt;p&gt;Thank you, Yudi, this last suggestion with the "!important" statement worked.&lt;/p&gt;</description></item><item><title>Html-formatted column headers and context menu</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Html-formatted-column-headers-and-context-menu/</link><pubDate>Fri, 02 Oct 2009 11:37:53 GMT</pubDate><dc:creator>james</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi Dasha,&lt;/p&gt;&lt;p&gt;I don't really recommend the way to use html in the Caption as it could cause issue when used with other features such as Select Columns, or other features that rely on Caption to draw the User Interface.&lt;/p&gt;
&lt;p&gt;If possible, try to isolate your scenario and investigate why the styles failed to render in your SharePoint page.&lt;/p&gt;
&lt;p&gt;In any chances, this code should work, try the following setting:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre&gt;&amp;lt;HeaderStyle CustomRules="font-family:Comic Sans MS!important;font-size:X-Small!important;" /&amp;gt;&lt;/pre&gt;
&lt;p&gt;That will ensure the specified styles are attached to the header without getting override from other aspects. &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps,&lt;br /&gt;James.&lt;/p&gt;</description></item><item><title>Html-formatted column headers and context menu</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Html-formatted-column-headers-and-context-menu/</link><pubDate>Fri, 02 Oct 2009 05:58:04 GMT</pubDate><dc:creator>dasha.fedorova@gmail.com</dc:creator><category>WebGrid</category><description>&lt;p&gt;Yudi,&lt;/p&gt;
&lt;p&gt;When we initially started trying to style the column headers this was the way I attempted to modify the styling the way that you're suggesting on the server side.  For some reason I was never able to see any effect.  I was able to influence the headers' background color, the borders, anything, but not the font styling. I can even set the bold/italic/underline on the server side through code - everything but the font name and size.  I don't know if it's the SharePoint environment interfering, or some other factor, but in the end, the &lt;strong&gt;only&lt;/strong&gt; thing that I was able to get working is setting the font style this way:&lt;/p&gt;&lt;pre&gt;protected void WebGrid1_InitializeLayout(object sender, ISNet.WebUI.WebGrid.LayoutEventArgs e)
{
   WebGridColumn column = WebGrid1.RootTable.Columns.GetNamedItem('ColName');
   column.Caption = '&amp;lt;div style="font-family:Comic Sans MS;font-size:X-Small;"&amp;gt;ColName&amp;lt;/div&amp;gt;';
}&lt;/pre&gt;
&lt;p&gt;I'm not really sure what the problem is, but I've spent way too much time trying to set it the easy and 'pretty' way.  I put the setting just about everywhere I could on the server side, and I never saw ANY effect, except when I finally went directly to the column's .Caption property.&lt;/p&gt;
&lt;p&gt;So if there's any javascript workaround that I can use to control the text that's displayed in the Selected Columns menu, that would be great..&lt;/p&gt;</description></item><item><title>Html-formatted column headers and context menu</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Html-formatted-column-headers-and-context-menu/</link><pubDate>Fri, 02 Oct 2009 00:22:35 GMT</pubDate><dc:creator>yudi@intersoftpt.com</dc:creator><category>WebGrid</category><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;Could you please inform us about how you set the styling of your column header? &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;I suspect that the way you set the column header style is not correct. &lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&amp;lt;ISWebGrid:WebGridColumn Caption="&amp;lt;div style='font-family:Comic Sans MS'&amp;gt;CustomerID&amp;lt;/div&amp;gt;"
    DataMember="CustomerID" Name="CustomerID" Width="100px"&amp;gt;
&amp;lt;/ISWebGrid:WebGridColumn&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;Please try to set the column header style by using “declarative way” or “server side code way” (as shown below).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;&lt;strong&gt;&lt;span style="text-decoration: underline"&gt;declarative way&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&amp;lt;LayoutSettings AllowContextMenu="True" AllowSelectColumns="Yes"&amp;gt;
    &amp;lt;HeaderStyle Font-Names="Comic Sans MS" Font-Size="8pt" /&amp;gt;
&amp;lt;/LayoutSettings&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;or &lt;strong&gt;&lt;span style="text-decoration: underline"&gt;server side code way&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;protected void WebGrid1_InitializeLayout(object sender, ISNet.WebUI.WebGrid.LayoutEventArgs e)
{
    WebGrid1.LayoutSettings.HeaderStyle.Font.Name = "Comic Sans MS";
    WebGrid1.LayoutSettings.HeaderStyle.Font.Size = FontUnit.Point(8);
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;Hope this help.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Html-formatted column headers and context menu</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Html-formatted-column-headers-and-context-menu/</link><pubDate>Thu, 01 Oct 2009 06:21:37 GMT</pubDate><dc:creator>dasha.fedorova@gmail.com</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;We're using html tags and formatting in our column headers, and when the column header context menu is used to select/deselect columns to be displayed, the column names show all the html tags.  Is there anything we can do to hide the tags?  Can we possibly control the text that's displayed in the column context menu?&lt;/p&gt;
&lt;p&gt;See attached screenshot.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Dasha.&lt;/p&gt;</description></item></channel></rss>