<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SharePoint Fun</title>
	<atom:link href="http://blog.qumsieh.ca/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.qumsieh.ca</link>
	<description>Developer's blog related to ASP.NET, SharePoint and Telerik Web Controls</description>
	<lastBuildDate>Tue, 16 Feb 2010 22:39:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Hide Columns in SharePoint New, Edit and Disp Forms</title>
		<link>http://blog.qumsieh.ca/2010/02/16/hide-columns-in-sharepoint-new-edit-and-disp-forms/</link>
		<comments>http://blog.qumsieh.ca/2010/02/16/hide-columns-in-sharepoint-new-edit-and-disp-forms/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 22:36:38 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=639</guid>
		<description><![CDATA[Hiding columns in SharePoint is nothing new really, there have been several articles written on this topic. The approach for doing this, however, does inspire some debate in terms of what the best practice is. Let&#8217;s say we can agree that there are three ways to get this done:

Using the built in content types to [...]]]></description>
			<content:encoded><![CDATA[<p>Hiding columns in SharePoint is nothing new really, there have been several articles written on this topic. The approach for doing this, however, does inspire some debate in terms of what the best practice is. Let&#8217;s say we can agree that there are three ways to get this done:</p>
<ol>
<li>Using the built in content types to specify which columns you wish to be hidden.</li>
<li>Using jQuery and a content editor web part to hide the columns as desired.</li>
<li>Hide the columns programmatically using code.</li>
</ol>
<p>I just wanted to make some comments on all three. The content type approach is a good one and relatively simple to implement. Once you&#8217;ve enabled content types for your list or library, click on the default content type, let&#8217;s say it&#8217;s Item, and choose the column you&#8217;d like to have hidden and simply set it&#8217;s column settings to Hidden. Here is an excellent reference for this technique: <a href="http://littletalk.wordpress.com/2009/03/30/hide-remove-title-column-from-sharepoint-list/" target="_blank">http://littletalk.wordpress.com/2009/03/30/hide-remove-title-column-from-sharepoint-list/</a>.</p>
<p>Ok so the above works good, but what happens if you only want to introduce these hidden columns on your <strong>New</strong> and <strong>Edit</strong> forms but not your <strong>Disp</strong> form as an example. Or what if your scenario requires that they are hidden from all default <strong>New</strong>, <strong>Edit</strong> and <strong>Disp</strong> forms, but you have some custom SharePoint Designer disp forms that you&#8217;ve created that those fields need to be visible on. The content type approach will hide the column for all forms and so that won&#8217;t always work. We need something more granular.</p>
<p>So there is where the jQuery approach comes in handy. Some great resources for this:</p>
<ul>
<li>Paul Galvin has written some great articles on this topic over at <a href="http://endusersharepoint.com" target="_blank">EndUserSharePoint</a> &#8211; <a href="http://www.endusersharepoint.com/2009/06/17/quick-and-easy-use-jquery-to-hide-a-text-field-on-a-sharepoint-form/" target="_blank">http://www.endusersharepoint.com/2009/06/17/quick-and-easy-use-jquery-to-hide-a-text-field-on-a-sharepoint-form/</a> and <a href="http://www.endusersharepoint.com/2009/06/18/quick-and-easy-a-better-way-to-use-jquery-to-hide-a-text-field-on-a-sharepoint-form/" target="_blank">http://www.endusersharepoint.com/2009/06/18/quick-and-easy-a-better-way-to-use-jquery-to-hide-a-text-field-on-a-sharepoint-form/</a></li>
</ul>
<p>As per the comments by Nathan Ahlstrom in the second link noted above, the final fix for me was to use:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'nobr:contains(&quot;Completion time&quot;)'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">closest</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'tr'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'nobr:contains(&quot;Score&quot;)'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">closest</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'tr'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Please note that I had to add quotes around the <strong>tr</strong> tag for this to work for me.</p>
<p>The final approach uses some custom code and the object model to hide columns for a given list. <a href="http://www.sharepointkings.com/2008/05/how-to-hide-column-of-sharepoint-list.html">http://www.sharepointkings.com/2008/05/how-to-hide-column-of-sharepoint-list.html</a>. Now I&#8217;m not entirely sure how this works with custom forms besides the <strong>New</strong>, <strong>Edit</strong> and <strong>Disp</strong> forms, and until I have time to try out, I won&#8217;t know the answer to that. It&#8217;s worth mentioning because it does give you some granularity in that you can specify hidden properties per form.</p>
<p>That&#8217;s all for now. Please send in your comments if you have them, would love to hear from you.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2010/02/16/hide-columns-in-sharepoint-new-edit-and-disp-forms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Heading to SPTechCon in February</title>
		<link>http://blog.qumsieh.ca/2010/01/20/heading-to-sptechcon-in-february/</link>
		<comments>http://blog.qumsieh.ca/2010/01/20/heading-to-sptechcon-in-february/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 19:12:41 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=636</guid>
		<description><![CDATA[I&#8217;ll be heading down to SPTechCon this February 10-12 in San Francisco and I&#8217;m looking forward to it for a variety of reasons. I&#8217;ll be participating as a Live Blogger once again and I&#8217;m really excited about this program that Mark Miller over at EndUserSharePoint.com has setup. It was a lot of fun at the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll be heading down to <strong>SPTechCon</strong> this February 10-12 in San Francisco and I&#8217;m looking forward to it for a variety of reasons. I&#8217;ll be participating as a Live Blogger once again and I&#8217;m really excited about this program that Mark Miller over at <a href="http://endusersharepoint.com">EndUserSharePoint.com</a> has setup. It was a lot of fun at the SharePoint Conference &#8216;09 and it&#8217;ll be just as great if not better this time around.</p>
<p>In case you weren&#8217;t following us at the conference late last year, this is your opportunity to get some of your questions answered through the live feeds. Sign up as a <strong>Live Blog Follower</strong> and the days of the conference you simply need to start submitting your questions. You can sign up using the following link: <a href="http://2010-02-10-sptechcon.eventbrite.com/">http://2010-02-10-sptechcon.eventbrite.com/</a>. Also just before I head down there, I&#8217;ll be setting up the live feeds on my blog, so you can follow us here as well.</p>
<p>I think the social aspects of these conferences has changed quite a bit with the use of tools like twitter and live blogging and it makes that experience that much more enjoyable. I am eager to get down there and mingle with some of the SharePoint people out there. Hope to see some of you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2010/01/20/heading-to-sptechcon-in-february/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Failed To Load Workflow Error in SharePoint Designer</title>
		<link>http://blog.qumsieh.ca/2010/01/16/failed-to-load-workflow-error-in-sharepoint-designer/</link>
		<comments>http://blog.qumsieh.ca/2010/01/16/failed-to-load-workflow-error-in-sharepoint-designer/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 23:06:11 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Designer]]></category>
		<category><![CDATA[Workflows]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=631</guid>
		<description><![CDATA[Ok I thought I&#8217;d post on this because it stumped me for close to 2 hours. So in my scenario, I have a WSS 3.0 installation with several SharePoint Designer workflows built. Many of these workflows use the Useful SharePoint Designer Custom Workflow Activities solution available on codeplex. After doing a migration from one server [...]]]></description>
			<content:encoded><![CDATA[<p>Ok I thought I&#8217;d post on this because it stumped me for close to 2 hours. So in my scenario, I have a WSS 3.0 installation with several SharePoint Designer workflows built. Many of these workflows use the <a href="http://spdactivities.codeplex.com/">Useful SharePoint Designer Custom Workflow Activities</a> solution available on codeplex. After doing a migration from one server to another, I found that when I attempted to open up my workflows that contained those custom activities, I would get an error:</p>
<blockquote><p><span style="color: #ff0000;">Failed to load workflow.</span></p></blockquote>
<p>Really frustrating error because it gives you absolutely nothing to go on. I do want to mention that I also tried building a brand new workflow and selecting one of these custom workflow activities and the behavior was odd. If i tried to add one as an ACTION inside my workflow designer, nothing would happen. No error, but the activity wasn&#8217;t added to the step either. It was as if my click/selection had no effect.</p>
<p>So I made the decision to completely remove and reinstall the custom activities. The codeplex solution comes nicely packaged using the SharePoint Installer, so all I had to do was run a remove and then a reinstall. Normally, a final step to getting this working according to the InstallGuide.txt is to:</p>
<blockquote><p>Go to Central Administration -> Application Management -> Manage Web Application Features and activate the feature for desired web applications (usually it&#8217;s Sharepoint &#8211; 80 or Sharepoint &#8211; 443).</p></blockquote>
<p>The odd thing was that I found this step was already done for me and the solution was listed as already deployed. So back to SharePoint Designer I went, double clicked on the .xoml file, damn, same error! I found several blog posts indicating that I should clear the SharePoint Designer cache. So I closed down SD, deleted the folders starting with 12.x.x.x and loaded SD back up. I tried to open my xoml file, still no luck, same error.</p>
<p>At this point I was getting pretty confused. I manually did a check of the Assembly to make sure it contained the DP.SharePoint.Workflow dll, I double checked the Features folder to make sure it contained the DP.SharePoint.Workflow folder and I make sure the .ACTIONS file was contained within the Workflow folder and that the permissions on it were not wonky. I also verified the web.config contained the safe control entries for that dll. All looked good to me.</p>
<p>FINALLY, I decided to compare my web.config against the old server&#8217;s web.config to make sure that I wasn&#8217;t missing anything. I did a quick search on DP and found that the old web.config contained one more entry than my new web.config did:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;authorizedType</span> <span style="color: #000066;">Assembly</span>=<span style="color: #ff0000;">&quot;DP.Sharepoint.Workflow, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0298457208daed83&quot;</span> <span style="color: #000066;">Namespace</span>=<span style="color: #ff0000;">&quot;DP.Sharepoint.Workflow&quot;</span> <span style="color: #000066;">TypeName</span>=<span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #000066;">Authorized</span>=<span style="color: #ff0000;">&quot;True&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></td></tr></table></div>

<p>So it would appear that I was missing this authorized type necessary for custom workflow activities. How or why this did not get added when I did my reinstall, I have no idea. But once that entry was added back, I was good to go again. My workflows open just fine without error.</p>
<p>I hope this helps someone else out there!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2010/01/16/failed-to-load-workflow-error-in-sharepoint-designer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jqGrid Text/Word Wrapping</title>
		<link>http://blog.qumsieh.ca/2009/12/03/jqgrid-textword-wrapping/</link>
		<comments>http://blog.qumsieh.ca/2009/12/03/jqgrid-textword-wrapping/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 04:54:31 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=598</guid>
		<description><![CDATA[Just a quick post for anyone else having this issue. I am working with the latest version of jqGrid, and I am dealing with cell data that is longer than the width of the cell making it difficult to see. I wanted to have this data wrap and the height of the cell adjust to [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick post for anyone else having this issue. I am working with the latest version of <a href="http://www.trirand.com/blog/">jqGrid</a>, and I am dealing with cell data that is longer than the width of the cell making it difficult to see. I wanted to have this data wrap and the height of the cell adjust to fit the wrapped content.</p>
<p>I found a <a href="http://www.trirand.com/blog/?page_id=393/help/word-wrap-support&#038;value=word%2525wrap%25251&#038;search=2">ton of useful</a> info on the jqGrid forums but it didn&#8217;t quite get me there.</p>
<p>The forum article in the above link suggests that you add the follwing CSS to your page:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">.ui-jqgrid tr.jqgrow td {
    white-space: normal !important;
}</pre></td></tr></table></div>

<p>The above worked great for FF, but in IE, it would wrap the content, but the cell height would not auto adjust and therefore you really couldn&#8217;t see the full content. So I made a couple more changes as per the code snippet below and this seemed to work for me.</p>
<p>So the <strong>height:auto</strong> forces the cell height to auto adjust based on the size of the wrapped content. I haven&#8217;t noticed any side effects of changing this. If anyone has I&#8217;d love to hear about it. The<strong> vertical-align:top</strong> ensures that the text positions at the top so that the cells with less content don&#8217;t disappear in the centre due to the larger cell blocks. And finally, I added a bit of <strong>padding</strong> so that my cells don&#8217;t look oddly aligned due to the vertical-align bit, but that&#8217;s optional. It&#8217;ll work without it.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">.ui-jqgrid tr.jqgrow td {
    white-space: normal !important;
    height:auto;
    vertical-align:text-top;
    padding-top:2px;
}</pre></td></tr></table></div>

<p>If anyone else has run into this issue or has had to make a similar change, add your contribution to the comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2009/12/03/jqgrid-textword-wrapping/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>RadGrid How To &#8211; Configure a HyperLink Client Side</title>
		<link>http://blog.qumsieh.ca/2009/11/24/radgrid-how-to-configure-a-hyperlink-client-side/</link>
		<comments>http://blog.qumsieh.ca/2009/11/24/radgrid-how-to-configure-a-hyperlink-client-side/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 01:45:58 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Telerik]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=587</guid>
		<description><![CDATA[I&#8217;ve been doing a lot of work recently with Telerik&#8217;s RadGrid configuration client side. This includes data binding, sorting, paging and working with columns and data rows. I&#8217;ll likely be doing a series on some of the issues I&#8217;ve encountered trying to work with these grids completely client side. The first of this series is [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing a lot of work recently with Telerik&#8217;s <a href="http://www.telerik.com">RadGrid</a> configuration client side. This includes data binding, sorting, paging and working with columns and data rows. I&#8217;ll likely be doing a series on some of the issues I&#8217;ve encountered trying to work with these grids completely client side. The first of this series is a relatively simple thing to do server side, but I definitely had issue with it client side.</p>
<p>Scenario:</p>
<p>I have a <strong>RadGrid</strong> called rgProjects configured with several <strong>GridBoundColumn</strong> fields and a single <strong>GridHyperLinkColumn</strong> field. The data binding for this grid is being done via an ajax call to a method in another page that returns some <a href="http://www.json.org">json</a> that I then bind to the grid. I&#8217;m leveraging the <strong>OnRowDataBound</strong> client event of this grid to perform some custom row manipulation. I figured this would be a good place to set up my HyperLink.</p>
<p><span style="text-decoration: underline;">Step 1 - Add the GridHyperLinkColumn to the grid</span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;telerik:RadGrid ID=&quot;rgProjects&quot; EnableViewState=&quot;false&quot; runat=&quot;server&quot;
            GridLines=&quot;None&quot; AutoGenerateColumns=&quot;False&quot; AllowSorting=&quot;true&quot; Width=&quot;100%&quot;&gt;
            &lt;MasterTableView TableLayout=&quot;Fixed&quot;&gt; 
                &lt;Columns&gt;
                    &lt;telerik:GridNumericColumn DataField=&quot;ID&quot; HeaderText=&quot;ID&quot; /&gt;
                    &lt;telerik:GridNumericColumn DataField=&quot;Title&quot; HeaderText=&quot;Title&quot; Display=&quot;false&quot; /&gt;
                    &lt;telerik:GridHyperLinkColumn DataTextField=&quot;Project&quot; DataNavigateUrlFields=&quot;Project&quot;
                        UniqueName=&quot;Project&quot; HeaderText=&quot;Project&quot; ItemStyle-Font-Underline=&quot;true&quot; /&gt;
                &lt;/Columns&gt;
            &lt;/MasterTableView&gt;
            &lt;ClientSettings&gt;
                &lt;ClientEvents OnRowDataBound=&quot;rgProjects_OnRowDataBound&quot; /&gt;
            &lt;/ClientSettings&gt;
&lt;/telerik:RadGrid&gt;</pre></td></tr></table></div>

<p>The JSON that&#8217;s being returned:</p>
<p>[{"ID":"1204","Title":"shereen's test project","Project":"http://server.local/_layouts/Demo/editform.aspx?ID=1204"}]</p>
<p>So the basic idea was, I wanted my hyperlink to have it&#8217;s value set to: &#8220;shereen&#8217;s test project&#8221; and I wanted the url to be set to: http://server.local/_layouts/Demo/editform.aspx?ID=1204. </p>
<blockquote><p>Do not confuse TITLE with VALUE. By TITLE, I mean the actual TITLE attribute of the A tag that&#8217;s used for a tooltip and by VALUE I mean the innerHTML that&#8217;s set and is actually visible to the user as the hyperlink itself. </p></blockquote>
<p>So it would read as follows:</p>
<p><a href="http://server.local/_layouts/Demo/editform.aspx?ID=1204" title="shereen's test project">shereen&#8217;s test project</a></p>
<p> This was not working for me initially because both the hyperlink&#8217;s value and url were being set as the url, which is not what I wanted:</p>
<p><a href="http://server.local/_layouts/Demo/editform.aspx?ID=1204" title="shereen's test project">http://server.local/_layouts/Demo/editform.aspx?ID=1204</a></p>
<p>In comes the OnRowDataBound event where I can override what&#8217;s happening above with what it is I actually want:</p>
<p><span style="text-decoration: underline;">Step 2 - Leverage the OnRowDataBound client event to configure our HyperLink</span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> rgProjects_OnRowDataBound<span style="color: #009900;">&#40;</span>sender<span style="color: #339933;">,</span> args<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>    
    <span style="color: #006600; font-style: italic;">// manually set the hyperlink's title</span>
    <span style="color: #003366; font-weight: bold;">var</span> <span style="color: #000066; font-weight: bold;">item</span> <span style="color: #339933;">=</span> args.<span style="color: #660066;">get_item</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> dataItem <span style="color: #339933;">=</span> args.<span style="color: #660066;">get_dataItem</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> link <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">get_cell</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Project&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>    
    link.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> dataItem.<span style="color: #660066;">Title</span><span style="color: #339933;">;</span>
    link.<span style="color: #660066;">href</span> <span style="color: #339933;">=</span> dataItem.<span style="color: #660066;">Project</span><span style="color: #339933;">;</span>
    link.<span style="color: #660066;">title</span> <span style="color: #339933;">=</span> dataItem.<span style="color: #660066;">Title</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>So the key thing to note above is you have to set the innerHTML. Title is optional, but the important ones are href and innerHTML. Any problems let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2009/11/24/radgrid-how-to-configure-a-hyperlink-client-side/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery &#8211; Get All Divs Whose ID Starts With</title>
		<link>http://blog.qumsieh.ca/2009/11/12/jquery-get-all-divs-whose-id-starts-with/</link>
		<comments>http://blog.qumsieh.ca/2009/11/12/jquery-get-all-divs-whose-id-starts-with/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 21:46:23 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=584</guid>
		<description><![CDATA[Structure:

1
2
3
4
&#60;div id=&#34;thisismydiv1&#34;&#62;&#60;/div&#62;
&#60;div id=&#34;thisismydiv2&#34;&#62;&#60;/div&#62;
&#60;div id=&#34;thisismydiv3&#34;&#62;&#60;/div&#62;
&#60;div id=&#34;thisismydiv4&#34;&#62;&#60;/div&#62;

To return an array of all divs that start with &#8216;thisismydiv&#8217;, you would use the following:

1
var divList = $&#40;&#34;div[id^='thisismydiv']&#34;&#41;;

The above translates to, find me all divs whose id starts with &#8216;thisismydiv&#8217;. You could now do something cool like add a class to all those divs:

1
$&#40;&#34;div[id^='thisismydiv']&#34;&#41;.addClass&#40;'myClass'&#41;;

]]></description>
			<content:encoded><![CDATA[<p>Structure:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;thisismydiv1&quot;&gt;&lt;/div&gt;
&lt;div id=&quot;thisismydiv2&quot;&gt;&lt;/div&gt;
&lt;div id=&quot;thisismydiv3&quot;&gt;&lt;/div&gt;
&lt;div id=&quot;thisismydiv4&quot;&gt;&lt;/div&gt;</pre></td></tr></table></div>

<p>To return an array of all divs that start with &#8216;thisismydiv&#8217;, you would use the following:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> divList <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div[id^='thisismydiv']&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The above translates to, find me all divs whose id starts with &#8216;thisismydiv&#8217;. You could now do something cool like add a class to all those divs:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div[id^='thisismydiv']&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'myClass'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2009/11/12/jquery-get-all-divs-whose-id-starts-with/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Write to EventLog from SharePoint Custom Solutions</title>
		<link>http://blog.qumsieh.ca/2009/11/04/write-to-eventlog-from-sharepoint-custom-solutions/</link>
		<comments>http://blog.qumsieh.ca/2009/11/04/write-to-eventlog-from-sharepoint-custom-solutions/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 00:47:40 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=578</guid>
		<description><![CDATA[Just a quick thing to note, if you&#8217;re trying to write to the event log within your custom SharePoint solutions and run across this error:
Cannot open log for source {0}. You may not have write access.
This is definitely permissions related. A quick bit of searching and I found some useful info:
The CustomSD registry value for [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick thing to note, if you&#8217;re trying to write to the event log within your custom SharePoint solutions and run across this error:</p>
<blockquote><p><span style="color: #ff0000;">Cannot open log for source {0}. You may not have write access.</span></p></blockquote>
<p>This is definitely permissions related. A quick bit of searching and I found some useful info:</p>
<blockquote><p>The CustomSD registry value for the Application event log is found under the <em>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application</em>registry key.  It is a string value which uses Security Descriptor Definition Language (<a style="color: #034efa;" title="Microsoft SDDL" href="http://msdn2.microsoft.com/EN-US/library/aa379567.aspx" target="_blank">SDDL</a>) to describe which accounts have access to which functions (e.g. read, write, clear) of the event log.  By <a style="color: #034efa;" title="W2K3 default event log permissions" href="http://blogs.msdn.com/ericfitz/archive/2006/03/01/541462.aspx" target="_blank">default</a> the application event log will allow any IIS 6 application pool identity write access (either as a <a style="color: #034efa;" title="Windows logon type codes" href="http://www.windowsecurity.com/articles/Logon-Types.html" target="_blank">service logon</a> or, in the case of custom accounts in the IIS_WPG group, as a <a style="color: #034efa;" title="Windows logon types" href="http://www.windowsecurity.com/articles/Logon-Types.html" target="_blank">batch logon</a>). (reference: <a href="http://forums.asp.net/t/1131903.aspx" target="_blank">http://forums.asp.net/t/1131903.aspx</a>)</p></blockquote>
<p>So the key in the above paragraph is that the app pool identity already has permission to write to the event log, so instead of mucking around with permissions, I made sure my function for writing to the eventlog is elevated as follows:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">void</span> LogMessage<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> message<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    SPSecurity.<span style="color: #0000FF;">RunWithElevatedPrivileges</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">delegate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #008000;">!</span>EventLog.<span style="color: #0000FF;">SourceExists</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;SharePoint Custom Solutions&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            EventLog.<span style="color: #0000FF;">CreateEventSource</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;SharePoint Custom Solutions&quot;</span>, <span style="color: #666666;">&quot;Application&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        EventLog.<span style="color: #0000FF;">WriteEntry</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;SharePoint Custom Solutions&quot;</span>,
                                    message,
                                    EventLogEntryType.<span style="color: #0000FF;">Error</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2009/11/04/write-to-eventlog-from-sharepoint-custom-solutions/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>jQuery UI Tabs &#8211; Creating Closable Tabs</title>
		<link>http://blog.qumsieh.ca/2009/10/29/jquery-ui-tabs-creating-closable-tabs/</link>
		<comments>http://blog.qumsieh.ca/2009/10/29/jquery-ui-tabs-creating-closable-tabs/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 19:05:51 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=568</guid>
		<description><![CDATA[Ok, so this is really a follow up to my previous post where I outlined how to build jQuery Tabs that Open and Close. I did end that post with a small TODO for myself: integrate the close capability into the tab itself so the user didn&#8217;t have to click a button to close that [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so this is really a follow up to my previous <a href="http://blog.qumsieh.ca/2009/10/27/building-jquery-tabs-that-open-close/">post</a> where I outlined how to build jQuery Tabs that Open and Close. I did end that post with a small TODO for myself: integrate the close capability into the tab itself so the user didn&#8217;t have to click a button to close that tab.</p>
<p>Now after doing a bit of digging, I learned that this is actually functionality that is in the works for future releases of jQuery UI. Ticket <a href="http://dev.jqueryui.com/ticket/3924" target="_blank">3924</a> is currently open and in development, which is a good sign. Further investigation landed me on this page: <a href="http://jsbin.com/uqage">http://jsbin.com/uqage</a> which is a fantastic example of how the Closable Tabs concept could work.</p>
<p>My final solution involved me tweaking the above to work as follows:</p>
<h3>Setting Up the HTML</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;mytabs&quot;&gt; 
   &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#tabs-home&quot;&gt;My Projects Home&lt;/a&gt;&lt;/li&gt;
   &lt;/ul&gt;
   &lt;div id=&quot;tabs-home&quot;&gt;
      &lt;h3&gt;Welcome to My Projects Home&lt;/h3&gt;
      &lt;p&gt;&lt;a href=&quot;#&quot; onclick=&quot;addTab('myActiveProjects', 'My Active Projects', 'RadGrid1')&quot;&gt;My Active Projects&lt;/a&gt;&lt;/p&gt;
      &lt;p&gt;&lt;a href=&quot;#&quot; onclick=&quot;addTab('mySalesActivities', 'My Sales Activities', 'RadGrid2')&quot;&gt;My Sales Activities&lt;/a&gt;&lt;/p&gt;
   &lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;tabs-myActiveProjects&quot; style=&quot;display:none;&quot;&gt;
&lt;h3&gt;My Active Projects&lt;/h3&gt;
&nbsp;
&lt;/div&gt;
&lt;div id=&quot;tabs-mySalesActivities&quot; style=&quot;display:none;&quot;&gt;
&lt;h3&gt;My Sales Activities&lt;/h3&gt;
&nbsp;
&lt;/div&gt;</pre></td></tr></table></div>

<h3>Wiring Up the Javascript</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span>init<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// tabs init with a custom tab template and an &quot;add&quot; callback filling in the content</span>
    <span style="color: #003366; font-weight: bold;">var</span> $tabs <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#mytabs&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tabs</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
        tabTemplate<span style="color: #339933;">:</span> <span style="color: #3366CC;">'&lt;li&gt;&lt;a href=&quot;#{href}&quot;&gt;#{label}&lt;/a&gt; &lt;span class=&quot;ui-test&quot;&gt;&lt;img src=&quot;images/cross.png&quot; /&gt;&lt;/span&gt;&lt;/li&gt;'</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// close icon: removing the tab on click</span>
    <span style="color: #006600; font-style: italic;">// note: closable tabs gonna be an option in the future - see http://dev.jqueryui.com/ticket/3924</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#mytabs span.ui-test'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">live</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> index <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li'</span><span style="color: #339933;">,</span>$tabs<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">index</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#mytabs span.ui-test'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#mytabs&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tabs</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'select'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> addTab<span style="color: #009900;">&#40;</span>tabID<span style="color: #339933;">,</span> tabName<span style="color: #339933;">,</span> grid<span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
    <span style="color: #006600; font-style: italic;">// double check to see if tab is already open</span>
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a[href^=#tabs-&quot;</span><span style="color: #339933;">+</span> tabID <span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;]&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a[href^=#tabs-&quot;</span><span style="color: #339933;">+</span> tabID <span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;]&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
        currentTabID <span style="color: #339933;">=</span> tabID<span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// this will add a tab via the standard method</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#mytabs&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tabs</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;add&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;#tabs-&quot;</span> <span style="color: #339933;">+</span> tabID<span style="color: #339933;">,</span>tabName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#tabs-&quot;</span> <span style="color: #339933;">+</span> tabID<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;display&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;block&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#mytabs&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tabs</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'select'</span><span style="color: #339933;">,</span> tabID<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<h3>Finalizing the Styles</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">&lt;script type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> src<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;jquery-1.3.2.min.js&quot;</span><span style="color: #00AA00;">&gt;</span>&lt;/script<span style="color: #00AA00;">&gt;</span>
&lt;script type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> src<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;jquery-ui-1.7.2.custom.min.js&quot;</span><span style="color: #00AA00;">&gt;</span>&lt;/script<span style="color: #00AA00;">&gt;</span>
&lt;link type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> href<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;styles/smoothness/jquery-ui-1.7.2.custom.css&quot;</span> rel<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> /<span style="color: #00AA00;">&gt;</span>
&lt;style type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span><span style="color: #00AA00;">&gt;</span>
    <span style="color: #cc00cc;">#mytabs</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1em</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
    <span style="color: #cc00cc;">#mytabs</span> li <span style="color: #6666ff;">.ui-test</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0.5em</span> <span style="color: #933;">0.4em</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&lt;/style<span style="color: #00AA00;">&gt;</span></pre></td></tr></table></div>

<p>Please, please leave a comment if you have any difficulty with this and I&#8217;ll do my best to help!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2009/10/29/jquery-ui-tabs-creating-closable-tabs/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Building jQuery Tabs That Open &amp; Close</title>
		<link>http://blog.qumsieh.ca/2009/10/27/building-jquery-tabs-that-open-close/</link>
		<comments>http://blog.qumsieh.ca/2009/10/27/building-jquery-tabs-that-open-close/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 18:55:39 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=553</guid>
		<description><![CDATA[jQuery is obviously a really powerful tool. If you&#8217;ve done any work with it, you don&#8217;t need convincing. My latest project involving jQuery was a bit tricky because I couldn&#8217;t find anything that detailed how to generate a tab once a user clicked on a link, and then how to close that tab if the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jQuery.com">jQuery</a> is obviously a really powerful tool. If you&#8217;ve done any work with it, you don&#8217;t need convincing. My latest project involving jQuery was a bit tricky because I couldn&#8217;t find anything that detailed how to generate a tab once a user clicked on a link, and then how to close that tab if the user clicked the close button. Here is my setup:</p>
<ol>
<li>I needed to create a page with some static links, that when clicked on would spawn a new tab.</li>
<li>The content area for each tab would contain a <strong>Close</strong> button that would remove the tab and hide the div contents. I didn&#8217;t want the div contents removed because I wanted users to be able to open the tabs again if they wanted to.</li>
</ol>
<p><strong>NOTE</strong>: I did attempt to dynamically generate the div contents by using a jQuery append statement on the content divs, but I ran into issues with this when placing a <a href="http://www.telerik.com">Telerik</a> RadGrid onto the page and had to abandon that approach.</p>
<p>Building the above with the <a href="http://docs.jquery.com/UI/Tabs">jQuery UI Tabs</a> library took me part of the way there. In the end, my solution looks as follows:</p>
<h3>Building the UI Tabs</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;mytabs&quot;&gt; 
   &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#tabs-home&quot;&gt;My Projects Home&lt;/a&gt;&lt;/li&gt;
   &lt;/ul&gt;
   &lt;div id=&quot;tabs-home&quot;&gt;
      &lt;h3&gt;Welcome to My Projects Home&lt;/h3&gt;
      &lt;p&gt;&lt;a href=&quot;#&quot; onclick=&quot;showTab('myActiveProjects', 'My Active Projects')&quot;&gt;My Active Projects&lt;/a&gt;&lt;/p&gt;
      &lt;p&gt;&lt;a href=&quot;#&quot; onclick=&quot;showTab('mySalesActivities', 'My Sales Activities')&quot;&gt;My Sales Activities&lt;/a&gt;&lt;/p&gt;
   &lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;tabs-myActiveProjects&quot; style=&quot;display:none;&quot;&gt;
    &lt;h3&gt;My Active Projects&lt;/h3&gt;
    &lt;p&gt;&lt;input type=&quot;button&quot; name=&quot;killTab&quot; value=&quot;Close&quot; onclick=&quot;hideTab('myActiveProjects')&quot; /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&quot;tabs-mySalesActivities&quot; style=&quot;display:none;&quot;&gt;
    &lt;h3&gt;My Sales Activities&lt;/h3&gt;
    &lt;p&gt;&lt;input type=&quot;button&quot; name=&quot;killTab&quot; value=&quot;Close&quot; onclick=&quot;hideTab('mySalesActivities')&quot; /&gt;&lt;/p&gt;
&lt;/div&gt;</pre></td></tr></table></div>

<h3>Wiring Up The Javascript</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#mytabs&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tabs</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> showTab<span style="color: #009900;">&#40;</span>tabID<span style="color: #339933;">,</span> tabName<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    currentTabID <span style="color: #339933;">=</span> tabID<span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// this will add a tab via the standard method</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#mytabs&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tabs</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;add&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;#tabs-&quot;</span> <span style="color: #339933;">+</span> tabID<span style="color: #339933;">,</span> tabName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#tabs-&quot;</span> <span style="color: #339933;">+</span> tabID<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;display&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;block&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#mytabs&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tabs</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'select'</span><span style="color: #339933;">,</span> tabID<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> hideTab<span style="color: #009900;">&#40;</span>tabID<span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#tabs-&quot;</span> <span style="color: #339933;">+</span> tabID<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;display&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;none&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a[href^=#tabs-&quot;</span><span style="color: #339933;">+</span> tabID <span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;]&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#mytabs&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tabs</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'select'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span>init<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Don&#8217;t forget to include the jQuery UI JS file and the corresponding CSS. You&#8217;ll also need to include the jQuery JS file as well. If you have any troubles with this, drop me a note.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;jquery-1.3.2.min.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;jquery-ui-1.7.2.custom.min.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>link type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/css&quot;</span> href<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;styles/smoothness/jquery-ui-1.7.2.custom.css&quot;</span> rel<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;stylesheet&quot;</span> <span style="color: #339933;">/&gt;</span></pre></td></tr></table></div>

<p>My next step with the above is to relocate the <strong>Close</strong> button so that it is an &#8216;X&#8217; image on the tab itself that when clicked on would close the tab. I&#8217;ll update once I figure that out! Good times!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2009/10/27/building-jquery-tabs-that-open-close/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SharePoint 2010 Keynote Overview</title>
		<link>http://blog.qumsieh.ca/2009/10/19/sharepoint-2010-keynote-overview/</link>
		<comments>http://blog.qumsieh.ca/2009/10/19/sharepoint-2010-keynote-overview/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 22:56:03 +0000</pubDate>
		<dc:creator>shereen</dc:creator>
				<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://blog.qumsieh.ca/?p=543</guid>
		<description><![CDATA[Hi all, I wanted to put together a summary of some of the things I felt were worthy of noting at this mornings SharePoint Conference 2009 Keynote. Not all of these may be 100% accurate, I did my best to jot things down as they were thrown out there. Any questions or comments, feel free [...]]]></description>
			<content:encoded><![CDATA[<p>Hi all, I wanted to put together a summary of some of the things I felt were worthy of noting at this mornings SharePoint Conference 2009 Keynote. Not all of these may be 100% accurate, I did my best to jot things down as they were thrown out there. Any questions or comments, feel free to ping me.</p>
<h3>General</h3>
<ol>
<li>No more hand coding web parts, Visual Studio 2010 now has a visual interface for developing web parts</li>
<li>SharePoint navigation is integrated into Visual Studio, so you don&#8217;t have to leave VS to browse the contents of your SharePoint site</li>
<li>You can now map folders in Visual Studio to SharePoint so when you deploy, for example, a image library, the files on the file system are transferred into SharePoint for you</li>
<li>One click deploy and debug, it&#8217;s no longer a &#8216;10&#8242; click process</li>
<li>New <strong>Developer Dashboard </strong>that loads on the page so you can debug your solution and review performance factors &#8212; You have to run an stsadm command to enable the dashboard, otherwise you won&#8217;t see it</li>
<li>Line of Business systems are greatly improved and the connectivity is a lot easier to implement</li>
<li>Built in spell check for draft items</li>
<li>SharePoint Designer 2010 and Visual Studio 2010 will NOT work with SharePoint 2007</li>
<li>1,000,000 items to a list or folder, the 2,000 item limit is dead</li>
<li>New Technologies: Microsoft PowerPivot for Excel and PowerPivot for SharePoint</li>
<li>New Ribbon interface is context sensitive</li>
<li>Changes, such as page edits, preview live as you make them</li>
<li><strong>NO MORE PAGE REFRESHES!!</strong></li>
<li>Document Sets is a new concept that is being introduced</li>
<li>All Office desktop apps now have a web version. SharePoint item context menu has a new link called View In Browser that opens files in the web version of desktop app</li>
<li>2010 is 64 bit only, it will not support anything else</li>
</ol>
<h3>New SharePoint Terminology</h3>
<ol>
<li>SharePoint Foundation &#8211; replacement for WSS 4.0</li>
<li>SharePoint Server</li>
<li>FAST SharePoint Search</li>
<li>SharePoint for Internet Sites, Standard Edition</li>
<li>SharePoint for Internet Sites, Enterprise Edition</li>
<li>SharePoint &#8216;12&#8242; hive is now &#8216;14&#8242; hive, but referred to as SharePoint Root</li>
</ol>
<p>Great first day, looking forward to tomorrow! I spent an hour or so working with the hands on labs and I have to say this new version is pretty darn exciting!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.qumsieh.ca/2009/10/19/sharepoint-2010-keynote-overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
