<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Rich Finn - Telerik</title>
    <link>http://blog.richfinn.net/blog/</link>
    <description>sharepointer</description>
    <language>en-us</language>
    <copyright>Rich Finn</copyright>
    <lastBuildDate>Thu, 08 May 2008 21:45:56 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>blog.richfinn.net@gmail.com</managingEditor>
    <webMaster>blog.richfinn.net@gmail.com</webMaster>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=78838983-d528-4336-9168-8c92b431119f</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,78838983-d528-4336-9168-8c92b431119f.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,78838983-d528-4336-9168-8c92b431119f.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=78838983-d528-4336-9168-8c92b431119f</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <strong>
            <font color="#ff0000">&lt;update date="6/19/08"&gt;</font>
            <br />
          </strong>
          <br />
Telerik has released the MOSS compatable version of the RadEditor that places all
needed files as class resource files in the _wpresource directory.  They've also
made some very nice improvements over the previous release that make extending and
customizing the editor very easy.  If you purchase and deploy the Full-Featrured
RadEditor, you get ALL of the controls in the Telerik ASP.NET AJAX control suite available
to you in MOSS.  Very nice...<br /><br /><strong><font color="#ff0000">&lt;/update&gt;</font></strong></p>
        <p>
 
</p>
        <p>
Yesterday I posted about using the new RadControls for ASP.NET AJAX in MOSS, and I
started moving the old controls in my current project over to the new ones. 
Just now, I found a problem when I was converting the RadEditor from the old to the
new.
</p>
        <p>
In the Telerik <a href="http://www.telerik.com/help/aspnet-ajax/gettingstarted.html" target="_blank">online
documentation for getting started with the RadEditor</a>, they say that in a standard
ASP.NET AJAX application, you need to utilize the App_GlobalResources and App_Data
ASP.NET folders in order to use the RadEditor.
</p>
        <p>
That's not any different for MOSS.
</p>
        <p>
In the root of your SharePoint Web Application (\Inetpub\wwwroot\wss\VirtualDirectories\YourWebApp)
create a folder named App_Data.  Drop in the RadSpell folder from the App_Data
folder of the RadControls install directory (C:\Program Files\Telerik\RadControls
for ASPNET AJAX Q1 2008).  Then, drop the RESX files from the App_GlobalResources
directory located at the Telerik install root into the already present App_GlobalResources
directory in your SharePoint Web Application root.
</p>
        <p>
I think there's probably a better a way to do this using a Solution, but I'll worry
about that later.  Not sure if we can deploy into those folders via a WSP - I
don't think so.  I know there's a public property on the RadEditor that allows
you to point to where the RadSpell directory is, but can't find anything for the RESX
files.
</p>
        <p>
Also, make sure you add the following line to the HttpHandlers section of your web
config file, or else, spellcheck won't work:<br /><font color="#0000ff">&lt;</font><font color="maroon">add</font><font color="red">verb</font><font color="black">=</font><font color="blue">"*"</font><font color="red">validate</font><font color="black">=</font><font color="blue">"false"</font><font color="red">path</font><font color="black">=</font><font color="blue">"Telerik.Web.UI.SpellCheckHandler.axd"</font><font color="red">type</font><font color="black">=</font><font color="blue">"Telerik.Web.UI.SpellCheckHandler,
Telerik.Web.UI"/&gt;</font></p>
        <p>
Anyway, here's a screen shot of the unskinned and unmodified RadEditor running in
my local MOSS environment.  This is not tied into a publishing placeholder, but
that's not what I'm using it for right now...
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowdoIgett.NETAJAXPrometheustoworkinMOSS_DDB2/image_2.png">
            <img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="615" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowdoIgett.NETAJAXPrometheustoworkinMOSS_DDB2/image_thumb.png" width="745" border="0" />
          </a>
        </p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=78838983-d528-4336-9168-8c92b431119f" />
      </body>
      <title>How do I get the RadEditor for ASP.NET AJAX (Prometheus) to work in MOSS?</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,78838983-d528-4336-9168-8c92b431119f.aspx</guid>
      <link>http://blog.richfinn.net/blog/2008/05/08/HowDoIGetTheRadEditorForASPNETAJAXPrometheusToWorkInMOSS.aspx</link>
      <pubDate>Thu, 08 May 2008 21:45:56 GMT</pubDate>
      <description>&lt;p&gt;
&lt;strong&gt;&lt;font color=#ff0000&gt;&amp;lt;update date="6/19/08"&amp;gt;&lt;/font&gt;
&lt;br&gt;
&lt;/strong&gt;
&lt;br&gt;
Telerik has released the MOSS compatable version of the RadEditor that places all
needed files as class resource files in the _wpresource directory.&amp;nbsp; They've also
made some very nice improvements over the previous release that make extending and
customizing the editor very easy.&amp;nbsp; If you&amp;nbsp;purchase and deploy the Full-Featrured
RadEditor, you get ALL of the controls in the Telerik ASP.NET AJAX control suite available
to you in MOSS.&amp;nbsp; Very nice...&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;font color=#ff0000&gt;&amp;lt;/update&amp;gt;&lt;/font&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Yesterday I posted about using the new RadControls for ASP.NET AJAX in MOSS, and I
started moving the old controls in my current project over to the new ones.&amp;nbsp;
Just now, I found a problem when I was converting the RadEditor from the old to the
new.
&lt;/p&gt;
&lt;p&gt;
In the Telerik &lt;a href="http://www.telerik.com/help/aspnet-ajax/gettingstarted.html" target=_blank&gt;online
documentation for getting started with the RadEditor&lt;/a&gt;, they say that in a standard
ASP.NET AJAX application, you need to utilize the App_GlobalResources and App_Data
ASP.NET folders in order to use the RadEditor.
&lt;/p&gt;
&lt;p&gt;
That's not any different for MOSS.
&lt;/p&gt;
&lt;p&gt;
In the root of your SharePoint Web Application (\Inetpub\wwwroot\wss\VirtualDirectories\YourWebApp)
create a folder named App_Data.&amp;nbsp; Drop in the RadSpell folder from the App_Data
folder of the RadControls install directory (C:\Program Files\Telerik\RadControls
for ASPNET AJAX Q1 2008).&amp;nbsp; Then, drop the RESX files from the App_GlobalResources
directory located at the Telerik install root into the already present App_GlobalResources
directory in your SharePoint Web Application root.
&lt;/p&gt;
&lt;p&gt;
I think there's probably a better a way to do this using a Solution, but I'll worry
about that later.&amp;nbsp; Not sure if we can deploy into those folders via a WSP - I
don't think so.&amp;nbsp; I know there's a public property on the RadEditor that allows
you to point to where the RadSpell directory is, but can't find anything for the RESX
files.
&lt;/p&gt;
&lt;p&gt;
Also, make sure you add the following line to the HttpHandlers section of your web
config file, or else, spellcheck won't work:&lt;br&gt;
&lt;font color=#0000ff&gt;&amp;lt;&lt;/font&gt;&lt;font color=maroon&gt;add&lt;/font&gt; &lt;font color=red&gt;verb&lt;/font&gt;&lt;font color=black&gt;=&lt;/font&gt;&lt;font color=blue&gt;"*"&lt;/font&gt; &lt;font color=red&gt;validate&lt;/font&gt;&lt;font color=black&gt;=&lt;/font&gt;&lt;font color=blue&gt;"false"&lt;/font&gt; &lt;font color=red&gt;path&lt;/font&gt;&lt;font color=black&gt;=&lt;/font&gt;&lt;font color=blue&gt;"Telerik.Web.UI.SpellCheckHandler.axd"&lt;/font&gt; &lt;font color=red&gt;type&lt;/font&gt;&lt;font color=black&gt;=&lt;/font&gt;&lt;font color=blue&gt;"Telerik.Web.UI.SpellCheckHandler,
Telerik.Web.UI"/&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Anyway, here's a screen shot of the unskinned and unmodified RadEditor running in
my local MOSS environment.&amp;nbsp; This is not tied into a publishing placeholder, but
that's not what I'm using it for right now...
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowdoIgett.NETAJAXPrometheustoworkinMOSS_DDB2/image_2.png"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=615 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/HowdoIgett.NETAJAXPrometheustoworkinMOSS_DDB2/image_thumb.png" width=745 border=0&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=78838983-d528-4336-9168-8c92b431119f" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,78838983-d528-4336-9168-8c92b431119f.aspx</comments>
      <category>Development</category>
      <category>Microsoft Office SharePoint Server</category>
      <category>Telerik</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=cb6e174c-c7a1-43fb-ada3-dc596caeaff9</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,cb6e174c-c7a1-43fb-ada3-dc596caeaff9.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,cb6e174c-c7a1-43fb-ada3-dc596caeaff9.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=cb6e174c-c7a1-43fb-ada3-dc596caeaff9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've been a huge proponent of <a href="http://www.telerik.com" target="_blank">Telerik</a> because
of their very impressive controls, support, and documentation - let alone for the
fact they are very easy to use.  Now that I've been working with SharePoint 2007
for a few years, I've found that Telerik's controls fit very nicely into MOSS. 
Andrew Connell even created an <a href="http://www.telerik.com/documents/MOSS_whitepaper.pdf" target="_blank">integration
whitepaper</a> and some <a href="http://www.telerik.com/documents/moss_utilities.zip" target="_blank">nice
utility EXEs</a> to help package the individual controls into WSPs to deploy them
into MOSS.
</p>
        <p>
Then, on April 15 of this year, Telerik released version 2008.1 of their new <a href="http://www.telerik.com/products/aspnet-ajax/overview.aspx" target="_blank">RadControls
Suite for ASP.NET AJAX</a>, formerly named 'Prometheus'.  I purchased my upgrade
from the old RadControl suite to the Prometheus controls yesterday, and there was
something that I noticed immediately which frightened me a little.  There's only
one assembly - Telerik.Web.UI.ddl - and nowhere that I could see on the Telerik site
that allowed me to get an individual control.
</p>
        <p>
Uh oh.  
</p>
        <p>
How do I get these amazing controls into SharePoint and start benefiting from that
ASP.NET AJAX goodness?  Do I package the whole thing into a WSP? I hope not!
That'll be a huge WSP file with all those skins getting packaged up!
</p>
        <p>
I was worried, and started thinking that I was going to be stuck with a legacy version
of some great controls, being forced to sit  here watching new versions go sailing
past every three months.  No way!!!
</p>
        <p>
I figured that there had to be a way, and if it took a massive WSP, so be it, so I
started poking around the new control suite to see how it ticked.  There's no
RadControls directory, so AC's walk-through documentation won't work.
</p>
        <p>
I tested the RadSlider locally, and I asked myself, where do the images come from
in the control?
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_4.png">
            <img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="111" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_1.png" width="241" border="0" />
          </a>
        </p>
        <p>
I got out my trusty IE Dev Toolbar and took a peak.  I liked what I saw.
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_8.png">
            <img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="58" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_3.png" width="315" border="0" />
          </a>
        </p>
        <p>
WebResource.axd!
</p>
        <p>
Now, I don't care if this image is an embedded resource file or not.  It's not
a direct reference to an image, and that's what matters.  What happens if a skin
is applied? Where's the image then?
</p>
        <p>
Office2007 skin:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_10.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="27" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_4.png" width="215" border="0" /></a></p>
        <p>
IE Dev Toolbar:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_12.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="52" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_5.png" width="304" border="0" /></a></p>
        <p>
Still a WebResource.axd. Excellent!
</p>
        <p>
So - here's the deal.  Install the entire RadControls EXE which you get via your
Telerik account on your SharePoint server.  Deploy the Telerik.Web.UI.dll to
your SharePoint application's bin, and add the following line to the SafeControls
block in the web.config
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_14.png">
            <img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="20" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_6.png" width="658" border="0" />
          </a>
        </p>
        <p>
That's it...
</p>
        <p>
Then, you can use any control in the entire suite just by adding the following Register
tag to the page where you're using it<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_16.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="29" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_7.png" width="631" border="0" /></a></p>
        <p>
No more individual control references anywhere! Sweet!
</p>
        <p>
For example - the RadTreeView control:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_18.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="34" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_8.png" width="750" border="0" /></a></p>
        <p>
You can even deploy this inside your custom WSP by using the various Visual Studio
project templates available on CodePlex.  I know of three that support deploying
other assemblies, so finding them shouldn't be hard.  <a href="http://www.codeplex.com/wspprojecttemplate" target="_blank">I'm
partial to this one</a>, and I know <a href="http://www.codeplex.com/stsdev" target="_blank">stsdev</a> is
really nice, as well.  You can even reference the Telerik control assembly server-side,
too.  Just make sure you set the CopyLocal property of the reference to False.
</p>
        <p>
You won't get IntelliSense for the controls, but as far as MOSS dev goes - what else
is new, right?  There's plenty of documentation on Telerik's site to help with
the control properties and client-side API.
</p>
        <p>
Here's the new RadSlider with the Office2007 skin running in one of my MOSS environment:<br /><a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_20.png"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="230" alt="image" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_9.png" width="483" border="0" /></a></p>
        <p>
I've started moving over all of the controls in my current project from the old version
of the suite to the new version, and there's been some minor changes, but nothing
of a pain at all.  The changes I have seen have been good ones, so it's been
worth it so far.  Besides, these controls ROCK!  I haven't gone through
and seen which ones work and which don't, but I'm sure it'll be similar to the old
version of the suite.  I know the RadSplitter was a hassle before, will have
to try it again with the new ones.  I've even noticed some performance gains
over the old controls.
</p>
        <p>
So, if you haven't picked up on it, I highly recommend these controls.  Not only
will they completely expand your MOSS UI potential, but they will get you to install
Service Pack 1 and <a href="http://sharepoint.microsoft.com/blogs/mike/Lists/Posts/Post.aspx?ID=3" target="_blank">configure
ASP.NET AJAX in SharePoint</a> if you haven't yet.  Remember, SP1 is required
if you want to use ASP.NET AJAX, therefore, it's required to use these controls.
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=cb6e174c-c7a1-43fb-ada3-dc596caeaff9" />
      </body>
      <title>Integrating Newest Telerik RadControls for ASP.NET AJAX into SharePoint</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,cb6e174c-c7a1-43fb-ada3-dc596caeaff9.aspx</guid>
      <link>http://blog.richfinn.net/blog/2008/05/07/IntegratingNewestTelerikRadControlsForASPNETAJAXIntoSharePoint.aspx</link>
      <pubDate>Wed, 07 May 2008 22:43:12 GMT</pubDate>
      <description>&lt;p&gt;
I've been a huge proponent of &lt;a href="http://www.telerik.com" target=_blank&gt;Telerik&lt;/a&gt;&amp;nbsp;because
of their very impressive controls, support, and documentation - let alone for the
fact they are very easy to use.&amp;nbsp; Now that I've been working with SharePoint 2007
for a few years, I've found that Telerik's controls fit very nicely into MOSS.&amp;nbsp;
Andrew Connell even created an &lt;a href="http://www.telerik.com/documents/MOSS_whitepaper.pdf" target=_blank&gt;integration
whitepaper&lt;/a&gt; and some &lt;a href="http://www.telerik.com/documents/moss_utilities.zip" target=_blank&gt;nice
utility EXEs&lt;/a&gt; to help package the individual controls into WSPs to deploy them
into MOSS.
&lt;/p&gt;
&lt;p&gt;
Then, on April 15 of this year, Telerik released version 2008.1 of their new &lt;a href="http://www.telerik.com/products/aspnet-ajax/overview.aspx" target=_blank&gt;RadControls
Suite for ASP.NET AJAX&lt;/a&gt;, formerly named 'Prometheus'.&amp;nbsp; I purchased my upgrade
from the old RadControl suite to the Prometheus controls yesterday, and there was
something that I noticed immediately which frightened me a little.&amp;nbsp; There's only
one assembly - Telerik.Web.UI.ddl - and nowhere that I could see on the Telerik site
that allowed me to get an individual control.
&lt;/p&gt;
&lt;p&gt;
Uh oh.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
How do I get these amazing controls into SharePoint and start benefiting from that
ASP.NET AJAX goodness?&amp;nbsp; Do I package the whole thing into a WSP? I hope not!
That'll be a huge WSP file with all those skins getting packaged up!
&lt;/p&gt;
&lt;p&gt;
I was worried, and started thinking that I was going to be stuck with a legacy version
of some great controls, being forced to sit&amp;nbsp; here watching new versions go sailing
past every three months.&amp;nbsp; No way!!!
&lt;/p&gt;
&lt;p&gt;
I figured that there had to be a way, and if it took a massive WSP, so be it, so I
started poking around the new control suite to see how it ticked.&amp;nbsp; There's no
RadControls directory, so AC's walk-through documentation won't work.
&lt;/p&gt;
&lt;p&gt;
I tested the RadSlider locally, and I asked myself, where do the images come from
in the control?
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_4.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=111 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_1.png" width=241 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
I got out my trusty IE Dev Toolbar and took a peak.&amp;nbsp; I liked what I saw.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_8.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=58 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_3.png" width=315 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
WebResource.axd!
&lt;/p&gt;
&lt;p&gt;
Now, I don't care if this image is an embedded resource file or not.&amp;nbsp; It's not
a direct reference to an image, and that's what matters.&amp;nbsp; What happens if a skin
is applied? Where's the image then?
&lt;/p&gt;
&lt;p&gt;
Office2007 skin:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_10.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=27 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_4.png" width=215 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
IE Dev Toolbar:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_12.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=52 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_5.png" width=304 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Still a WebResource.axd. Excellent!
&lt;/p&gt;
&lt;p&gt;
So - here's the deal.&amp;nbsp; Install the entire RadControls EXE which you get via your
Telerik account on your SharePoint server.&amp;nbsp; Deploy the Telerik.Web.UI.dll to
your SharePoint application's bin, and add the following line to the SafeControls
block in the web.config
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_14.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=20 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_6.png" width=658 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
That's it...
&lt;/p&gt;
&lt;p&gt;
Then, you can use any control in the entire suite just by adding the following Register
tag to the page where you're using it&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_16.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=29 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_7.png" width=631 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
No more individual control references anywhere! Sweet!
&lt;/p&gt;
&lt;p&gt;
For example - the RadTreeView control:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_18.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=34 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_8.png" width=750 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
You can even deploy this inside your custom WSP by using the various Visual Studio
project templates available on CodePlex.&amp;nbsp; I know of three that support deploying
other assemblies, so finding them shouldn't be hard.&amp;nbsp; &lt;a href="http://www.codeplex.com/wspprojecttemplate" target=_blank&gt;I'm
partial to this one&lt;/a&gt;, and I know &lt;a href="http://www.codeplex.com/stsdev" target=_blank&gt;stsdev&lt;/a&gt; is
really nice, as well.&amp;nbsp; You can even reference the Telerik control assembly server-side,
too.&amp;nbsp; Just make sure you set the CopyLocal property of the reference to False.
&lt;/p&gt;
&lt;p&gt;
You won't get IntelliSense for the controls, but as far as MOSS dev goes - what else
is new, right?&amp;nbsp; There's plenty of documentation on Telerik's site to help with
the control properties and client-side API.
&lt;/p&gt;
&lt;p&gt;
Here's the new RadSlider with the Office2007 skin running in one of my MOSS environment:&lt;br&gt;
&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_20.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=230 alt=image src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/IntegratingNewestT.NETAJAXintoSharePoint_EAD2/image_thumb_9.png" width=483 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
I've started moving over all of the controls in my current project from the old version
of the suite to the new version, and there's been some minor changes, but nothing
of a pain at all.&amp;nbsp; The changes I have seen have been good ones, so it's been
worth it so far.&amp;nbsp; Besides, these controls ROCK!&amp;nbsp; I haven't gone through
and seen which ones work and which don't, but I'm sure it'll be similar to the old
version of the suite.&amp;nbsp; I know the RadSplitter was a hassle before, will have
to try it again with the new ones.&amp;nbsp; I've even noticed some performance gains
over the old controls.
&lt;/p&gt;
&lt;p&gt;
So, if you haven't picked up on it, I highly recommend these controls.&amp;nbsp; Not only
will they completely expand your MOSS UI potential, but they will get you to install
Service Pack 1 and &lt;a href="http://sharepoint.microsoft.com/blogs/mike/Lists/Posts/Post.aspx?ID=3" target=_blank&gt;configure
ASP.NET AJAX in SharePoint&lt;/a&gt; if you haven't yet.&amp;nbsp; Remember, SP1 is required
if you want to use ASP.NET AJAX, therefore, it's required to use these controls.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=cb6e174c-c7a1-43fb-ada3-dc596caeaff9" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,cb6e174c-c7a1-43fb-ada3-dc596caeaff9.aspx</comments>
      <category>Development</category>
      <category>Microsoft Office SharePoint Server</category>
      <category>Telerik</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=3a2b67d9-9ccc-4ff7-b158-cf37d738a458</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,3a2b67d9-9ccc-4ff7-b158-cf37d738a458.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,3a2b67d9-9ccc-4ff7-b158-cf37d738a458.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=3a2b67d9-9ccc-4ff7-b158-cf37d738a458</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just received a nice little sting...
</p>
        <p>
I love the Telerik Editor for MOSS, so I use it almost on every page.  I wanted
to perform an upgrade to the 4.4.0.0 version, but I just got slammed by a big gotcha!
</p>
        <p>
I've always followed the <a href="http://www.telerik.com/help/radeditormoss/Using%20RadEditor%20in%20Web%20Content%20Management%20scenario.html">Telerik
documentation for adding the editor to a page layout</a>.  But I must say, after
today, I don't agree at all!
</p>
        <p>
When Telerik releases a new version of the RadEditor, they change the version number
on the assembly, naturally.  The downfall of this is that because of the new
version number, you have to go to every page layout and change the version number
in the Register tag at the top of the page.  This stinks!
</p>
        <p>
To keep yourself from having this same problem, place the <a href="http://msdn2.microsoft.com/en-us/library/ms164640.aspx">control
reference in the web config file</a> of the sites that you are using the RadEditor. 
This will allow you to update the control reference only once next time, not on every
single page layout file.
</p>
        <p>
This should be done for all Telerik controls used on page layouts...
</p>
        <p>
Here's another little thing that might be worth doing:<br />
The image browser in the RadEditor for MOSS doesn't allow you to traverse the site
structure like the OOB MOSS RichTextEditor, therefore you can't choose images from
the SiteCollectionImages library.  To fix this, open the editor's tools
file (located at \Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.1.0.0__1f131a624888eeed\RadControls\Editor)
and rename the <strong>ImageManager </strong>tool to <strong>MOSSImageManager</strong>. 
Got this gem on the <a href="http://www.telerik.com/community/forums/thread/b311D-hattg.aspx">Telerik
forum</a>...
</p>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=3a2b67d9-9ccc-4ff7-b158-cf37d738a458" />
      </body>
      <title>Upgrading Telerik Editor for MOSS Gotcha: Place Telerik control references in web.config!</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,3a2b67d9-9ccc-4ff7-b158-cf37d738a458.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/10/18/UpgradingTelerikEditorForMOSSGotchaPlaceTelerikControlReferencesInWebconfig.aspx</link>
      <pubDate>Thu, 18 Oct 2007 06:02:48 GMT</pubDate>
      <description>&lt;p&gt;
Just received a nice little sting...
&lt;/p&gt;
&lt;p&gt;
I love the Telerik Editor for MOSS, so I use it almost on every page.&amp;nbsp; I wanted
to perform an upgrade to the 4.4.0.0 version, but I just got slammed by a big gotcha!
&lt;/p&gt;
&lt;p&gt;
I've always followed the &lt;a href="http://www.telerik.com/help/radeditormoss/Using%20RadEditor%20in%20Web%20Content%20Management%20scenario.html"&gt;Telerik
documentation for adding the editor to a page layout&lt;/a&gt;.&amp;nbsp; But I must say, after
today, I don't agree at all!
&lt;/p&gt;
&lt;p&gt;
When Telerik releases a new version of the RadEditor, they change the version number
on the assembly, naturally.&amp;nbsp; The downfall of this is that because of the new
version number, you have to go to every page layout and change the version number
in the Register tag at the top of the page.&amp;nbsp; This stinks!
&lt;/p&gt;
&lt;p&gt;
To keep yourself from having this same problem, place the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms164640.aspx"&gt;control
reference in the web config file&lt;/a&gt; of the sites that you are using the RadEditor.&amp;nbsp;
This will allow you to update the control reference only once next time, not on every
single page layout file.
&lt;/p&gt;
&lt;p&gt;
This should be done for all Telerik controls used on page layouts...
&lt;/p&gt;
&lt;p&gt;
Here's another little thing that might be worth doing:&lt;br&gt;
The image browser in the RadEditor for MOSS doesn't allow you to traverse the site
structure like the OOB MOSS RichTextEditor, therefore you can't choose images from
the SiteCollectionImages library.&amp;nbsp; To&amp;nbsp;fix this, open the editor's tools
file (located at&amp;nbsp;\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.1.0.0__1f131a624888eeed\RadControls\Editor)
and rename the &lt;strong&gt;ImageManager &lt;/strong&gt;tool to &lt;strong&gt;MOSSImageManager&lt;/strong&gt;.&amp;nbsp;
Got this gem on the &lt;a href="http://www.telerik.com/community/forums/thread/b311D-hattg.aspx"&gt;Telerik
forum&lt;/a&gt;...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=3a2b67d9-9ccc-4ff7-b158-cf37d738a458" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,3a2b67d9-9ccc-4ff7-b158-cf37d738a458.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
      <category>Telerik</category>
    </item>
    <item>
      <trackback:ping>http://blog.richfinn.net/blog/Trackback.aspx?guid=efa1ea9a-037f-4978-b827-cb7dd3e0ad1c</trackback:ping>
      <pingback:server>http://blog.richfinn.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.richfinn.net/blog/PermaLink,guid,efa1ea9a-037f-4978-b827-cb7dd3e0ad1c.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://blog.richfinn.net/blog/CommentView,guid,efa1ea9a-037f-4978-b827-cb7dd3e0ad1c.aspx</wfw:comment>
      <wfw:commentRss>http://blog.richfinn.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=efa1ea9a-037f-4978-b827-cb7dd3e0ad1c</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
So, <a href="http://www.sharepointblogs.com/mossman">The Mossman</a> commented on
my <a href="http://blog.richfinn.net/blog/2007/08/14/CustomCMOSSNavigationUsingPortalSiteMapProvider.aspx">post
yesterday</a> saying that a little source around the PSMP would be nice, so
just for him, here it is.  I figured it would be good to build on <a href="http://www.telerik.com/products/sharepoint/integration-guide.aspx">Andrew
Connell's Telerik MOSS Integration Guide</a>, so this example shows how to create
your own top-level menu in a custom server-control using the <a href="http://www.telerik.com/products/aspnet/controls/menu/overview.aspx">Telerik
RadMenu</a> and the <a href="http://msdn2.microsoft.com/en-us/library/ms582344.aspx">PortalSiteMapProvider</a>. 
I know not everybody will have the license for the Telerik RadMenu, so if you don't,
hopefully you'll be able to take this example and pull out of it what
you need.
</p>
        <p>
Also, I posted this post on top of the one yesterday, whoops. 
There's a good lesson on locally saving your postings. Sorry if it's shown up new
a couple of times for some of you. Wish I could figure out why...
</p>
        <p>
This solution shows how you could add custom attributes on each RadMenuItem from SPField
values in the PublishingPage along with a custom client-side script event
handler. 
</p>
        <p>
          <a href="http://blog.richfinn.net/blog/downloads/RadMenu_PSMP_Source.txt" target="_blank">Download
the source for the complete control</a> in a text file, if you'd like it.
</p>
        <p>
The menu created will look like the following and will pop a JavaScript alert with
the relevant PublishingPage and SPWeb GUIDs when clicked:<br /><br />
 <a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/SampleCodeforCustomCMOSSNavigationUsingP_8BCC/PSMP_Menu.jpg" atomicselection="true"><img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="117" alt="PSMP_Menu" src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/SampleCodeforCustomCMOSSNavigationUsingP_8BCC/PSMP_Menu_thumb.jpg" width="366" border="0" /></a></p>
        <div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 750px; BACKGROUND-COLOR: #f4f4f4">
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <p>
              <span style="COLOR: #0000ff">protected</span>
              <span style="COLOR: #0000ff">override</span>
              <span style="COLOR: #0000ff">void</span> CreateChildControls()
{ <span style="COLOR: #008000">//Get the root publishingweb web for the site</span> PublishingWeb
rootWeb = PublishingWeb.GetPublishingWeb(SPContext.Current.Site.RootWeb); <span style="COLOR: #008000">//Get
the URL of the default page in the web</span><span style="COLOR: #0000ff">string</span> defaultPageUrl
= rootWeb.DefaultPage.ServerRelativeUrl; <span style="COLOR: #008000">//find the item
in the PSMP</span> PortalListItemSiteMapNode smnHome = (PortalListItemSiteMapNode)PortalSiteMapProvider.
</p>
            <p>
CurrentNavSiteMapProviderNoEncode.FindSiteMapNode(defaultPageUrl); <span style="COLOR: #008000">//initialize
the RadMenu</span> RadMenu menu = <span style="COLOR: #0000ff">new</span> RadMenu();
menu.ID = <span style="COLOR: #006080">"MainMenu"</span>; menu.RadControlsDir = <span style="COLOR: #006080">"/_wpresources/RadMenu.Net2/4.3.2.0__bbe59a8ad3533e68/RadControls"</span>;
menu.Skin = <span style="COLOR: #006080">"Outlook"</span>; <span style="COLOR: #008000">//Set
the client-side clicked event handler</span> menu.OnClientItemClicked = <span style="COLOR: #006080">"MainMenu_RadMenuItemClicked"</span>; <span style="COLOR: #008000">//create
the first menu item for the default (home) page</span> RadMenuItem rmiHome = createMenuItem(smnHome);
menu.Items.Add(rmiHome); <span style="COLOR: #008000">//iterate through each one of
the pages and subsites and create menu items for them</span><span style="COLOR: #0000ff">foreach</span> (SiteMapNode
smnTopLevelItem <span style="COLOR: #0000ff">in</span> smnHome.ParentNode.ChildNodes)
{ RadMenuItem rmiTopLevelItem = createMenuItem(smnTopLevelItem); <span style="COLOR: #008000">//if
the current sitemap has children, create a submenu for it</span><span style="COLOR: #0000ff">if</span> (smnTopLevelItem.HasChildNodes)
{ <span style="COLOR: #0000ff">foreach</span> (SiteMapNode smnChildItem <span style="COLOR: #0000ff">in</span> smnTopLevelItem.ChildNodes)
{ RadMenuItem rmiChildItem = createMenuItem(smnChildItem); rmiTopLevelItem.Items.Add(rmiChildItem);
} } menu.Items.Add(rmiTopLevelItem); } <span style="COLOR: #0000ff">this</span>.Controls.Add(menu); <span style="COLOR: #008000">//create
the client-side script for the RadMenuItemClicked event handler</span> StringBuilder
sbScript = <span style="COLOR: #0000ff">new</span> StringBuilder(); sbScript.Append(Environment.NewLine
+ <span style="COLOR: #006080">"&lt;script language=\"javascript\"&gt;"</span>); sbScript.Append(Environment.NewLine
+ <span style="COLOR: #006080">"function MainMenu_RadMenuItemClicked(sender, eventArgs)"</span>);
sbScript.Append(Environment.NewLine + <span style="COLOR: #006080">"{"</span>); sbScript.Append(Environment.NewLine
+ <span style="COLOR: #006080">"var pageGuid = eventArgs.Item.GetAttribute(\"PageGuid\");"</span>);
sbScript.Append(Environment.NewLine + <span style="COLOR: #006080">"var webGuid =
eventArgs.Item.GetAttribute(\"WebGuid\");"</span>); sbScript.Append(Environment.NewLine
+ <span style="COLOR: #006080">"alert(\"WebGuid:\" + webGuid + \" PageGuid:\" + pageGuid);"</span>);
sbScript.Append(Environment.NewLine + <span style="COLOR: #006080">"}"</span>); sbScript.Append(Environment.NewLine
+ <span style="COLOR: #006080">"&lt;/script&gt;"</span>); <span style="COLOR: #0000ff">this</span>.Page.ClientScript.RegisterStartupScript(<span style="COLOR: #0000ff">typeof</span>(<span style="COLOR: #0000ff">string</span>), <span style="COLOR: #006080">"RadMenu_MainMenu_RadMenuItemClicked"</span>,
sbScript.ToString()); } <span style="COLOR: #008000">/// &lt;summary&gt;</span><span style="COLOR: #008000">///
Create a RadMenuItem from a SiteMapNode</span><span style="COLOR: #008000">/// &lt;/summary&gt;</span><span style="COLOR: #008000">///
&lt;param name="siteMapNode"&gt;SiteMapNode used to create RadMenuItem &lt;/param&gt;</span><span style="COLOR: #008000">///
&lt;returns&gt;RadMenuItem&lt;/returns&gt;</span><span style="COLOR: #0000ff">private</span> RadMenuItem
createMenuItem(SiteMapNode siteMapNode) { RadMenuItem menuItem = <span style="COLOR: #0000ff">new</span> RadMenuItem();
menuItem.NavigateUrl = siteMapNode.Url; menuItem.Text = siteMapNode.Title; SPListItem
listItem = <span style="COLOR: #0000ff">null</span>; <span style="COLOR: #008000">//if
the SiteMapNode is the default page, it will be a PortalWebSiteMapNode</span><span style="COLOR: #0000ff">if</span> (siteMapNode <span style="COLOR: #0000ff">is</span> PortalWebSiteMapNode)
listItem = getListItemFromPortalSiteMapNode((PortalWebSiteMapNode)siteMapNode); <span style="COLOR: #0000ff">if</span> (siteMapNode <span style="COLOR: #0000ff">is</span> PortalListItemSiteMapNode)
listItem = getListItemFromPortalSiteMapNode((PortalListItemSiteMapNode)siteMapNode); <span style="COLOR: #008000">//create
the custom attributes on the list item</span><span style="COLOR: #0000ff">if</span> (listItem
!= <span style="COLOR: #0000ff">null</span>) { menuItem.Attributes.Add(<span style="COLOR: #006080">"PageGuid"</span>,
listItem.UniqueId.ToString(<span style="COLOR: #006080">"N"</span>)); menuItem.Attributes.Add(<span style="COLOR: #006080">"WebGuid"</span>,
listItem.Web.ID.ToString(<span style="COLOR: #006080">"N"</span>)); menuItem.ToolTip
= listItem.Fields[<span style="COLOR: #006080">"MenuItemToolTip"</span>].GetFieldValueAsText(listItem[<span style="COLOR: #006080">"MenuItemToolTip"</span>]);
} <span style="COLOR: #0000ff">else</span> { menuItem.Attributes.Add(<span style="COLOR: #006080">"PageGuid"</span>, <span style="COLOR: #0000ff">string</span>.Empty);
menuItem.Attributes.Add(<span style="COLOR: #006080">"WebGuid"</span>, <span style="COLOR: #0000ff">string</span>.Empty);
menuItem.ToolTip = siteMapNode.Title; } <span style="COLOR: #0000ff">return</span> menuItem;
} <span style="COLOR: #0000ff">private</span> SPListItem getListItemFromPortalSiteMapNode(PortalListItemSiteMapNode
siteMapNode) { SPWeb web = SPContext.Current.Site.AllWebs[siteMapNode.WebId]; PublishingWeb
pubWeb = PublishingWeb.GetPublishingWeb(web); SPListItem pageItem = pubWeb.PagesList.Items[siteMapNode.UniqueId]; <span style="COLOR: #0000ff">return</span> pageItem;
} <span style="COLOR: #0000ff">private</span> SPListItem getListItemFromPortalSiteMapNode(PortalWebSiteMapNode
siteMapNode) { SPWeb web = SPContext.Current.Site.AllWebs[siteMapNode.WebId]; PublishingWeb
pubWeb = PublishingWeb.GetPublishingWeb(web); SPListItem pageItem = <span style="COLOR: #0000ff">null</span>; <span style="COLOR: #0000ff">if</span>(pubWeb.DefaultPage
!= <span style="COLOR: #0000ff">null</span>) pageItem = pubWeb.PagesList.Items[pubWeb.DefaultPage.Item.UniqueId]; <span style="COLOR: #0000ff">return</span> pageItem;
}
</p>
          </pre>
        </div>
        <img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=efa1ea9a-037f-4978-b827-cb7dd3e0ad1c" />
      </body>
      <title>Sample Code for Custom C# MOSS Navigation Using PortalSiteMapProvider</title>
      <guid isPermaLink="false">http://blog.richfinn.net/blog/PermaLink,guid,efa1ea9a-037f-4978-b827-cb7dd3e0ad1c.aspx</guid>
      <link>http://blog.richfinn.net/blog/2007/08/15/SampleCodeForCustomCMOSSNavigationUsingPortalSiteMapProvider.aspx</link>
      <pubDate>Wed, 15 Aug 2007 12:24:05 GMT</pubDate>
      <description>&lt;p&gt;
So, &lt;a href="http://www.sharepointblogs.com/mossman"&gt;The Mossman&lt;/a&gt; commented on
my &lt;a href="http://blog.richfinn.net/blog/2007/08/14/CustomCMOSSNavigationUsingPortalSiteMapProvider.aspx"&gt;post
yesterday&lt;/a&gt; saying&amp;nbsp;that a little source around the PSMP would be nice,&amp;nbsp;so
just for him,&amp;nbsp;here it is.&amp;nbsp; I figured it would be good to build on &lt;a href="http://www.telerik.com/products/sharepoint/integration-guide.aspx"&gt;Andrew
Connell's Telerik MOSS Integration Guide&lt;/a&gt;, so this example&amp;nbsp;shows how to create
your own top-level menu in a custom server-control&amp;nbsp;using the &lt;a href="http://www.telerik.com/products/aspnet/controls/menu/overview.aspx"&gt;Telerik
RadMenu&lt;/a&gt; and the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms582344.aspx"&gt;PortalSiteMapProvider&lt;/a&gt;.&amp;nbsp;
I know not everybody will have the license for the Telerik RadMenu, so if you don't,
hopefully&amp;nbsp;you'll be able to&amp;nbsp;take this example and pull out&amp;nbsp;of it what
you need.
&lt;/p&gt;
&lt;p&gt;
Also, I&amp;nbsp;posted this post on top of the one&amp;nbsp;yesterday,&amp;nbsp;whoops.&amp;nbsp;
There's a good lesson on locally saving your postings. Sorry if it's shown up new
a couple of times for some of you. Wish I could figure out why...
&lt;/p&gt;
&lt;p&gt;
This solution shows how you could add custom attributes on each RadMenuItem from&amp;nbsp;SPField
values&amp;nbsp;in the PublishingPage&amp;nbsp;along with a custom client-side script event
handler. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.richfinn.net/blog/downloads/RadMenu_PSMP_Source.txt" target=_blank&gt;Download
the source for the complete control&lt;/a&gt; in a text file, if you'd like it.
&lt;/p&gt;
&lt;p&gt;
The menu created will look like the following and will pop a JavaScript alert with
the relevant PublishingPage and SPWeb GUIDs when clicked:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&lt;a href="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/SampleCodeforCustomCMOSSNavigationUsingP_8BCC/PSMP_Menu.jpg" atomicselection="true"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=117 alt=PSMP_Menu src="http://blog.richfinn.net/blog/content/binary/WindowsLiveWriter/SampleCodeforCustomCMOSSNavigationUsingP_8BCC/PSMP_Menu_thumb.jpg" width=366 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; HEIGHT: 750px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;
&lt;p&gt;
&lt;span style="COLOR: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; CreateChildControls()
{ &lt;span style="COLOR: #008000"&gt;//Get the root publishingweb web for the site&lt;/span&gt; PublishingWeb
rootWeb = PublishingWeb.GetPublishingWeb(SPContext.Current.Site.RootWeb); &lt;span style="COLOR: #008000"&gt;//Get
the URL of the default page in the web&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; defaultPageUrl
= rootWeb.DefaultPage.ServerRelativeUrl; &lt;span style="COLOR: #008000"&gt;//find the item
in the PSMP&lt;/span&gt; PortalListItemSiteMapNode smnHome = (PortalListItemSiteMapNode)PortalSiteMapProvider.
&lt;/p&gt;
&lt;p&gt;
CurrentNavSiteMapProviderNoEncode.FindSiteMapNode(defaultPageUrl); &lt;span style="COLOR: #008000"&gt;//initialize
the RadMenu&lt;/span&gt; RadMenu menu = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; RadMenu();
menu.ID = &lt;span style="COLOR: #006080"&gt;"MainMenu"&lt;/span&gt;; menu.RadControlsDir = &lt;span style="COLOR: #006080"&gt;"/_wpresources/RadMenu.Net2/4.3.2.0__bbe59a8ad3533e68/RadControls"&lt;/span&gt;;
menu.Skin = &lt;span style="COLOR: #006080"&gt;"Outlook"&lt;/span&gt;; &lt;span style="COLOR: #008000"&gt;//Set
the client-side clicked event handler&lt;/span&gt; menu.OnClientItemClicked = &lt;span style="COLOR: #006080"&gt;"MainMenu_RadMenuItemClicked"&lt;/span&gt;; &lt;span style="COLOR: #008000"&gt;//create
the first menu item for the default (home) page&lt;/span&gt; RadMenuItem rmiHome = createMenuItem(smnHome);
menu.Items.Add(rmiHome); &lt;span style="COLOR: #008000"&gt;//iterate through each one of
the pages and subsites and create menu items for them&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;foreach&lt;/span&gt; (SiteMapNode
smnTopLevelItem &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt; smnHome.ParentNode.ChildNodes)
{ RadMenuItem rmiTopLevelItem = createMenuItem(smnTopLevelItem); &lt;span style="COLOR: #008000"&gt;//if
the current sitemap has children, create a submenu for it&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (smnTopLevelItem.HasChildNodes)
{ &lt;span style="COLOR: #0000ff"&gt;foreach&lt;/span&gt; (SiteMapNode smnChildItem &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt; smnTopLevelItem.ChildNodes)
{ RadMenuItem rmiChildItem = createMenuItem(smnChildItem); rmiTopLevelItem.Items.Add(rmiChildItem);
} } menu.Items.Add(rmiTopLevelItem); } &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;.Controls.Add(menu); &lt;span style="COLOR: #008000"&gt;//create
the client-side script for the RadMenuItemClicked event handler&lt;/span&gt; StringBuilder
sbScript = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; StringBuilder(); sbScript.Append(Environment.NewLine
+ &lt;span style="COLOR: #006080"&gt;"&amp;lt;script language=\"javascript\"&amp;gt;"&lt;/span&gt;); sbScript.Append(Environment.NewLine
+ &lt;span style="COLOR: #006080"&gt;"function MainMenu_RadMenuItemClicked(sender, eventArgs)"&lt;/span&gt;);
sbScript.Append(Environment.NewLine + &lt;span style="COLOR: #006080"&gt;"{"&lt;/span&gt;); sbScript.Append(Environment.NewLine
+ &lt;span style="COLOR: #006080"&gt;"var pageGuid = eventArgs.Item.GetAttribute(\"PageGuid\");"&lt;/span&gt;);
sbScript.Append(Environment.NewLine + &lt;span style="COLOR: #006080"&gt;"var webGuid =
eventArgs.Item.GetAttribute(\"WebGuid\");"&lt;/span&gt;); sbScript.Append(Environment.NewLine
+ &lt;span style="COLOR: #006080"&gt;"alert(\"WebGuid:\" + webGuid + \" PageGuid:\" + pageGuid);"&lt;/span&gt;);
sbScript.Append(Environment.NewLine + &lt;span style="COLOR: #006080"&gt;"}"&lt;/span&gt;); sbScript.Append(Environment.NewLine
+ &lt;span style="COLOR: #006080"&gt;"&amp;lt;/script&amp;gt;"&lt;/span&gt;); &lt;span style="COLOR: #0000ff"&gt;this&lt;/span&gt;.Page.ClientScript.RegisterStartupScript(&lt;span style="COLOR: #0000ff"&gt;typeof&lt;/span&gt;(&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;), &lt;span style="COLOR: #006080"&gt;"RadMenu_MainMenu_RadMenuItemClicked"&lt;/span&gt;,
sbScript.ToString()); } &lt;span style="COLOR: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;///
Create a RadMenuItem from a SiteMapNode&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;///
&amp;lt;param name="siteMapNode"&amp;gt;SiteMapNode used to create RadMenuItem &amp;lt;/param&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;///
&amp;lt;returns&amp;gt;RadMenuItem&amp;lt;/returns&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;private&lt;/span&gt; RadMenuItem
createMenuItem(SiteMapNode siteMapNode) { RadMenuItem menuItem = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; RadMenuItem();
menuItem.NavigateUrl = siteMapNode.Url; menuItem.Text = siteMapNode.Title; SPListItem
listItem = &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;; &lt;span style="COLOR: #008000"&gt;//if
the SiteMapNode is the default page, it will be a PortalWebSiteMapNode&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (siteMapNode &lt;span style="COLOR: #0000ff"&gt;is&lt;/span&gt; PortalWebSiteMapNode)
listItem = getListItemFromPortalSiteMapNode((PortalWebSiteMapNode)siteMapNode); &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (siteMapNode &lt;span style="COLOR: #0000ff"&gt;is&lt;/span&gt; PortalListItemSiteMapNode)
listItem = getListItemFromPortalSiteMapNode((PortalListItemSiteMapNode)siteMapNode); &lt;span style="COLOR: #008000"&gt;//create
the custom attributes on the list item&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (listItem
!= &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;) { menuItem.Attributes.Add(&lt;span style="COLOR: #006080"&gt;"PageGuid"&lt;/span&gt;,
listItem.UniqueId.ToString(&lt;span style="COLOR: #006080"&gt;"N"&lt;/span&gt;)); menuItem.Attributes.Add(&lt;span style="COLOR: #006080"&gt;"WebGuid"&lt;/span&gt;,
listItem.Web.ID.ToString(&lt;span style="COLOR: #006080"&gt;"N"&lt;/span&gt;)); menuItem.ToolTip
= listItem.Fields[&lt;span style="COLOR: #006080"&gt;"MenuItemToolTip"&lt;/span&gt;].GetFieldValueAsText(listItem[&lt;span style="COLOR: #006080"&gt;"MenuItemToolTip"&lt;/span&gt;]);
} &lt;span style="COLOR: #0000ff"&gt;else&lt;/span&gt; { menuItem.Attributes.Add(&lt;span style="COLOR: #006080"&gt;"PageGuid"&lt;/span&gt;, &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;.Empty);
menuItem.Attributes.Add(&lt;span style="COLOR: #006080"&gt;"WebGuid"&lt;/span&gt;, &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;.Empty);
menuItem.ToolTip = siteMapNode.Title; } &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; menuItem;
} &lt;span style="COLOR: #0000ff"&gt;private&lt;/span&gt; SPListItem getListItemFromPortalSiteMapNode(PortalListItemSiteMapNode
siteMapNode) { SPWeb web = SPContext.Current.Site.AllWebs[siteMapNode.WebId]; PublishingWeb
pubWeb = PublishingWeb.GetPublishingWeb(web); SPListItem pageItem = pubWeb.PagesList.Items[siteMapNode.UniqueId]; &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; pageItem;
} &lt;span style="COLOR: #0000ff"&gt;private&lt;/span&gt; SPListItem getListItemFromPortalSiteMapNode(PortalWebSiteMapNode
siteMapNode) { SPWeb web = SPContext.Current.Site.AllWebs[siteMapNode.WebId]; PublishingWeb
pubWeb = PublishingWeb.GetPublishingWeb(web); SPListItem pageItem = &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;; &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt;(pubWeb.DefaultPage
!= &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;) pageItem = pubWeb.PagesList.Items[pubWeb.DefaultPage.Item.UniqueId]; &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; pageItem;
}
&lt;/p&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://blog.richfinn.net/blog/aggbug.ashx?id=efa1ea9a-037f-4978-b827-cb7dd3e0ad1c" /&gt;</description>
      <comments>http://blog.richfinn.net/blog/CommentView,guid,efa1ea9a-037f-4978-b827-cb7dd3e0ad1c.aspx</comments>
      <category>Microsoft Office SharePoint Server</category>
      <category>Navigation</category>
      <category>Telerik</category>
    </item>
  </channel>
</rss>