<?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>Brian Grinstead &#187; development</title>
	<atom:link href="http://www.briangrinstead.com/blog/tag/development/feed" rel="self" type="application/rss+xml" />
	<link>http://www.briangrinstead.com/blog</link>
	<description></description>
	<lastBuildDate>Tue, 10 Aug 2010 18:26:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Make Table Rows Sortable Using jQuery UI Sortable</title>
		<link>http://www.briangrinstead.com/blog/make-table-rows-sortable-using-jquery-ui-sortable</link>
		<comments>http://www.briangrinstead.com/blog/make-table-rows-sortable-using-jquery-ui-sortable#comments</comments>
		<pubDate>Thu, 30 Jul 2009 20:17:51 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[cell]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery-ui]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sortable]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://www.briangrinstead.com/blog/?p=352</guid>
		<description><![CDATA[I wrote an article on the LANIT Development blog about a problem that I ran into when trying to set up a basic sortable table using jQuery UI. The columns would collapse down once the dragging began. This was fixed by adjusting the helper object for the sortable function. Check out the article for all [...]]]></description>
			<content:encoded><![CDATA[<p>I <a href="http://lanitdev.wordpress.com/2009/07/23/make-table-rows-sortable-using-jquery-ui-sortable/">wrote an article on the LANIT Development blog</a> about a problem that I ran into when trying to set up a basic sortable table using jQuery UI.  The columns would collapse down once the dragging began.</p>

<p><img src="http://briangrinstead.com/files/sotable-row-collapsed.png" alt="sortable-row-collapsed" title="sortable-row-collapsed" class="aligncenter size-full" /></p>

<p>This was fixed by adjusting the <a href="http://jqueryui.com/demos/sortable/#option-helper">helper object</a> for the sortable function.  Check out the <a href="http://lanitdev.wordpress.com/2009/07/23/make-table-rows-sortable-using-jquery-ui-sortable/">article</a> for all the details, but here is a sample of the code if you are just looking for the solution:</p>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;color: #008000;">// Return a helper with preserved width of cells</span>
<span style="color: #003366; font-weight: bold;color: #0000FF;">var</span> fixHelper <span style="color: #339933;color: #000000;">=</span> <span style="color: #003366; font-weight: bold;color: #0000FF;">function</span><span style="color: #009900;color: #000000;">&#40;</span>e<span style="color: #339933;color: #000000;">,</span> ui<span style="color: #009900;color: #000000;">&#41;</span> <span style="color: #009900;color: #000000;">&#123;</span>
	ui.<span style="color: #660066;">children</span><span style="color: #009900;color: #000000;">&#40;</span><span style="color: #009900;color: #000000;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;color: #000000;">&#40;</span><span style="color: #003366; font-weight: bold;color: #0000FF;">function</span><span style="color: #009900;color: #000000;">&#40;</span><span style="color: #009900;color: #000000;">&#41;</span> <span style="color: #009900;color: #000000;">&#123;</span>
		$<span style="color: #009900;color: #000000;">&#40;</span><span style="color: #000066; font-weight: bold;color: #0000FF;">this</span><span style="color: #009900;color: #000000;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;color: #000000;">&#40;</span>$<span style="color: #009900;color: #000000;">&#40;</span><span style="color: #000066; font-weight: bold;color: #0000FF;">this</span><span style="color: #009900;color: #000000;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;color: #000000;">&#40;</span><span style="color: #009900;color: #000000;">&#41;</span><span style="color: #009900;color: #000000;">&#41;</span><span style="color: #339933;color: #000000;">;</span>
	<span style="color: #009900;color: #000000;">&#125;</span><span style="color: #009900;color: #000000;">&#41;</span><span style="color: #339933;color: #000000;">;</span>
	<span style="color: #000066; font-weight: bold;color: #0000FF;">return</span> ui<span style="color: #339933;color: #000000;">;</span>
<span style="color: #009900;color: #000000;">&#125;</span><span style="color: #339933;color: #000000;">;</span>
&nbsp;
$<span style="color: #009900;color: #000000;">&#40;</span><span style="color: #3366CC;color: #808080;">&quot;#sort tbody&quot;</span><span style="color: #009900;color: #000000;">&#41;</span>.<span style="color: #660066;">sortable</span><span style="color: #009900;color: #000000;">&#40;</span><span style="color: #009900;color: #000000;">&#123;</span>
	helper<span style="color: #339933;color: #000000;">:</span> fixHelper
<span style="color: #009900;color: #000000;">&#125;</span><span style="color: #009900;color: #000000;">&#41;</span>.<span style="color: #660066;">disableSelection</span><span style="color: #009900;color: #000000;">&#40;</span><span style="color: #009900;color: #000000;">&#41;</span><span style="color: #339933;color: #000000;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.briangrinstead.com/blog/make-table-rows-sortable-using-jquery-ui-sortable/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Extending jQuery to Select ASP Controls</title>
		<link>http://www.briangrinstead.com/blog/extending-jquery-to-select-asp-controls</link>
		<comments>http://www.briangrinstead.com/blog/extending-jquery-to-select-asp-controls#comments</comments>
		<pubDate>Mon, 08 Jun 2009 18:54:30 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.briangrinstead.com/?p=226</guid>
		<description><![CDATA[One thing that has always been annoying about programming JavaScript in an ASP.NET Web Forms environment is that the ID attribute of HTML controls rendered out from ASP controls is unpredictable. &#60;asp:TextBox runat=&#34;server&#34; ID=&#34;txtPhoneNumber&#34; /&#62; renders out as something like: &#60;input type=&#34;text&#34; id=&#34;ctl00_ctl00_ctl00_main_Content_txtPhoneNumber&#34; name=&#34;ctl00$ctl00$ctl00$main$Content$txtPhoneNumber&#34; /&#62; I did a write up over on the LANIT development [...]]]></description>
			<content:encoded><![CDATA[<p>One thing that has always been annoying about programming JavaScript in an ASP.NET Web Forms environment is that the ID attribute of HTML controls rendered out from ASP controls is unpredictable.</p>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">	&lt;asp:TextBox runat=&quot;server&quot; ID=&quot;txtPhoneNumber&quot; /&gt;</pre></div></div>


<p>renders out as something like:</p>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">	&lt;input type=&quot;text&quot; id=&quot;ctl00_ctl00_ctl00_main_Content_txtPhoneNumber&quot; 
		name=&quot;ctl00$ctl00$ctl00$main$Content$txtPhoneNumber&quot; /&gt;</pre></div></div>


<p>I <a href="http://lanitdev.wordpress.com/2009/06/08/extending-jquery-to-select-asp-controls/">did a write up</a> over on the <a href="http://lanitdev.wordpress.com/">LANIT development blog</a> about a solution to this problem using jQuery.</p>

<p>Check out the post for more details, but here is the function:</p>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">	jQuery.<span style="color: #660066;">expr</span><span style="color: #009900;color: #000000;">&#91;</span><span style="color: #3366CC;color: #808080;">':'</span><span style="color: #009900;color: #000000;">&#93;</span>.<span style="color: #660066;">asp</span> <span style="color: #339933;color: #000000;">=</span> <span style="color: #003366; font-weight: bold;color: #0000FF;">function</span><span style="color: #009900;color: #000000;">&#40;</span>elem<span style="color: #339933;color: #000000;">,</span> i<span style="color: #339933;color: #000000;">,</span> match<span style="color: #009900;color: #000000;">&#41;</span> <span style="color: #009900;color: #000000;">&#123;</span>
		<span style="color: #000066; font-weight: bold;color: #0000FF;">return</span> <span style="color: #009900;color: #000000;">&#40;</span>elem.<span style="color: #660066;">id</span> <span style="color: #339933;color: #000000;">&amp;&amp;</span> elem.<span style="color: #660066;">id</span>.<span style="color: #660066;">match</span><span style="color: #009900;color: #000000;">&#40;</span>match<span style="color: #009900;color: #000000;">&#91;</span><span style="color: #CC0000;color: #808080;">3</span><span style="color: #009900;color: #000000;">&#93;</span> <span style="color: #339933;color: #000000;">+</span> <span style="color: #3366CC;color: #808080;">&quot;$&quot;</span><span style="color: #009900;color: #000000;">&#41;</span><span style="color: #009900;color: #000000;">&#41;</span><span style="color: #339933;color: #000000;">;</span>
	<span style="color: #009900;color: #000000;">&#125;</span><span style="color: #339933;color: #000000;">;</span>
&nbsp;
	$<span style="color: #009900;color: #000000;">&#40;</span><span style="color: #3366CC;color: #808080;">&quot;:asp(txtPhoneNumber)&quot;</span><span style="color: #009900;color: #000000;">&#41;</span>.<span style="color: #660066;">keyup</span><span style="color: #009900;color: #000000;">&#40;</span>...<span style="color: #009900;color: #000000;">&#41;</span><span style="color: #339933;color: #000000;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.briangrinstead.com/blog/extending-jquery-to-select-asp-controls/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
