<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.2" -->
<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/"
	>

<channel>
	<title>RyanDev.com</title>
	<link>http://ryandev.com</link>
	<description></description>
	<pubDate>Sat, 04 Feb 2012 21:52:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
	<language>en</language>
			<item>
		<title>SQL - Concatenate Rows into Single Value</title>
		<link>http://ryandev.com/sql-concatenate-rows-into-single-value/</link>
		<comments>http://ryandev.com/sql-concatenate-rows-into-single-value/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 21:52:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://ryandev.com/sql-concatenate-rows-into-single-value/</guid>
		<description><![CDATA[Sometimes you may need to concatenate the values from a single column from many rows together.  To do so, declare a variable to store the values in and do the following:
DECLARE @ConcatenatedValues NVARCHAR (MAX)
SELECT @ConcatenatedValues = COALESCE(@ConcatenatedValues + &#8216;;&#8217;, &#8221;) + ColumnFromTable
FROM Table
It&#8217;s that simple.
]]></description>
			<content:encoded><![CDATA[<p>Sometimes you may need to concatenate the values from a single column from many rows together.  To do so, declare a variable to store the values in and do the following:</p>
<p>DECLARE @ConcatenatedValues NVARCHAR (MAX)<br />
SELECT @ConcatenatedValues = COALESCE(@ConcatenatedValues + &#8216;;&#8217;, &#8221;) + ColumnFromTable<br />
FROM Table</p>
<p>It&#8217;s that simple.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryandev.com/sql-concatenate-rows-into-single-value/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Export Data From DataGrid to Excel and Format The Cells</title>
		<link>http://ryandev.com/export-data-from-datagrid-to-excel-and-format-the-cells/</link>
		<comments>http://ryandev.com/export-data-from-datagrid-to-excel-and-format-the-cells/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 21:05:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[C#]]></category>

		<category><![CDATA[Microsoft .Net]]></category>

		<category><![CDATA[asp.net]]></category>

		<guid isPermaLink="false">http://ryandev.com/export-data-from-datagrid-to-excel-and-format-the-cells/</guid>
		<description><![CDATA[There is an easy way to export your data from a DataGrid to Excel and control the formatting of the data.  If you do not provide formatting for Excel you may lose leading zeros or have your numbers converted to scientific notation or have other pieces of data get lost.
The trick is to dynamically add [...]]]></description>
			<content:encoded><![CDATA[<p>There is an easy way to export your data from a DataGrid to Excel and control the formatting of the data.  If you do not provide formatting for Excel you may lose leading zeros or have your numbers converted to scientific notation or have other pieces of data get lost.</p>
<p>The trick is to dynamically add styles, that Excel recognizes, to the Response object.  When Excel is opening the HTML from the DataGrid and sees the styles it will set the formatting for you.  To see a list of available styles refer to <a target="_blank" href="http://cosicimiento.blogspot.com/2008/11/styling-excel-cells-with-mso-number.html">this link</a></p>
<p>After you call DataBind() on your DataGrid you can call the following function.</p>
<p><span style="background-color: white; font-family: Consolas; color: blue; font-size: 13px">private</span><span style="background-color: white; font-family: Consolas; font-size: 13px"> </span><span style="background-color: white; font-family: Consolas; color: blue; font-size: 13px">void</span><span style="background-color: white; font-family: Consolas; font-size: 13px"> ExportGrid(</span><span style="background-color: white; font-family: Consolas; color: blue; font-size: 13px">string</span><span style="background-color: white"><font size="2" face="Consolas"> fileName)<br />
</font></span><span style="background-color: white; font-family: Consolas; font-size: 13px">{<br />
</span><span style="background-color: white; font-family: Consolas; font-size: 13px"><span style="white-space: pre" class="Apple-tab-span"></span>Response.Clear();<br />
</span><span style="background-color: white; font-family: Consolas; font-size: 13px"><span style="white-space: pre" class="Apple-tab-span"></span>Response.Buffer = </span><span style="background-color: white; font-family: Consolas; color: blue; font-size: 13px">true</span><span style="background-color: white; font-family: Consolas; font-size: 13px">;<br />
<span style="white-space: pre" class="Apple-tab-span"></span></span><span style="background-color: white; font-family: Consolas; font-size: 13px">Response.Charset = </span><span style="background-color: white; font-family: Consolas; color: #a31515; font-size: 13px">&#8220;&#8221;</span><span style="background-color: white; font-family: Consolas; font-size: 13px">;<br />
</span><span style="background-color: white; font-family: Consolas; font-size: 13px"><span style="white-space: pre" class="Apple-tab-span"></span>Response.AddHeader(</span><span style="background-color: white; font-family: Consolas; color: #a31515; font-size: 13px">&#8220;content-disposition&#8221;</span><span style="background-color: white; font-family: Consolas; font-size: 13px">, </span><span style="background-color: white; font-family: Consolas; color: #a31515; font-size: 13px">&#8220;attachment; filename=&#8221;</span><span style="background-color: white; font-family: Consolas; font-size: 13px"> + fileName);<br />
</span><span style="background-color: white; font-family: Consolas; font-size: 13px"><span style="white-space: pre" class="Apple-tab-span"></span>Response.ContentType = </span><span style="background-color: white; font-family: Consolas; color: #a31515; font-size: 13px">&#8220;application/vnd.ms-excel&#8221;</span><span style="background-color: white; font-family: Consolas; font-size: 13px">;<br />
</span><span style="background-color: white; font-family: Consolas; font-size: 13px"><span style="white-space: pre" class="Apple-tab-span"></span>StringWriter</span><span style="background-color: white; font-family: Consolas; font-size: 13px"> sw = </span><span style="background-color: white; font-family: Consolas; color: blue; font-size: 13px">new</span><span style="background-color: white; font-family: Consolas; font-size: 13px"> System.IO.</span><span style="background-color: white; font-family: Consolas; color: #2b91af; font-size: 13px">StringWriter</span><span style="background-color: white; font-family: Consolas; font-size: 13px">();<br />
</span><span style="background-color: white; font-family: Consolas; font-size: 13px"><span style="white-space: pre" class="Apple-tab-span"></span>HtmlTextWriter</span><span style="background-color: white; font-family: Consolas; font-size: 13px"> htw = </span><span style="background-color: white; font-family: Consolas; color: blue; font-size: 13px">new</span><span style="background-color: white; font-family: Consolas; font-size: 13px"> </span><span style="background-color: white; font-family: Consolas; color: #2b91af; font-size: 13px">HtmlTextWriter</span><span style="background-color: white; font-family: Consolas; font-size: 13px">(sw);<br />
</span><span style="background-color: white; font-family: Consolas; font-size: 13px"><span style="white-space: pre" class="Apple-tab-span"></span>DataTable</span><span style="background-color: white; font-family: Consolas; font-size: 13px"> dt = (</span><span style="background-color: white; font-family: Consolas; color: #2b91af; font-size: 13px">DataTable</span><span style="background-color: white; font-family: Consolas; font-size: 13px">)DataGrid1.DataSource;</span><span style="background-color: white; font-family: Consolas; font-size: 13px"> </span></p>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="white-space: pre" class="Apple-tab-span">	</span>// here, we loop through each row and then each cell and check the data type.  We then add the appropriate class              <span style="background-color: white; color: blue"><span class="Apple-tab-span">	</span> </span><span style="background-color: white; color: blue"><span style="white-space: pre" class="Apple-tab-span">	</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white; color: blue"><span style="white-space: pre" class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">	</span>foreach</span><span style="background-color: white"> (</span><span style="background-color: white; color: #2b91af">DataGridItem</span><span style="background-color: white"> itm </span><span style="background-color: white; color: blue">in</span><span style="background-color: white"> DataGrid1.Items)              </span><span style="background-color: white"><span class="Apple-tab-span">	</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">	</span>{                 </span><span style="background-color: white">             </span><span style="background-color: white"><span class="Apple-tab-span">		</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span></span><span style="background-color: white; color: blue"><span style="white-space: pre" class="Apple-tab-span">		</span>for</span><span style="background-color: white"> (</span><span style="background-color: white; color: blue">int</span><span style="background-color: white"> i = 0; i &lt; itm.Cells.Count; i++)                 </span><span style="background-color: white"><span class="Apple-tab-span">		</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">		</span>{                      </span><span style="background-color: white"><span class="Apple-tab-span">			</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">			</span>TableCell</span><span style="background-color: white"> tc = itm.Cells[i];                      </span><span style="background-color: white"><span class="Apple-tab-span">			</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">			</span>switch</span><span style="background-color: white"> (dt.Columns[i].DataType.ToString().ToLower())                     </span><span style="background-color: white"><span class="Apple-tab-span">			</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">			</span>{                          </span><span style="background-color: white"><span class="Apple-tab-span">				</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">				</span>case</span><span style="background-color: white"> </span><span style="background-color: white; color: #a31515">&#8220;system.string&#8221;</span><span style="background-color: white">:                              </span><span style="background-color: white"><span class="Apple-tab-span">					</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">					</span>tc.Attributes.Add(</span><span style="background-color: white; color: #a31515">&#8220;class&#8221;</span><span style="background-color: white">, </span><span style="background-color: white; color: #a31515">&#8220;text&#8221;</span><span style="background-color: white">);                              </span><span style="background-color: white"><span class="Apple-tab-span">					</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">					</span>break</span><span style="background-color: white">;       </span><span style="background-color: white"><span class="Apple-tab-span">				</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">				</span>case</span><span style="background-color: white"> </span><span style="background-color: white; color: #a31515">&#8220;system.datetime&#8221;</span><span style="background-color: white">:                              </span><span style="background-color: white"><span class="Apple-tab-span">					</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">					</span>tc.Attributes.Add(</span><span style="background-color: white; color: #a31515">&#8220;class&#8221;</span><span style="background-color: white">, </span><span style="background-color: white; color: #a31515">&#8220;dt&#8221;</span><span style="background-color: white">);                             </span><span style="background-color: white"><span class="Apple-tab-span">					</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">					</span>break</span><span style="background-color: white">;                           </span><span style="background-color: white"><span class="Apple-tab-span">				</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span></span><span style="background-color: white; color: blue"><span style="white-space: pre" class="Apple-tab-span">				</span>case</span><span style="background-color: white"> </span><span style="background-color: white; color: #a31515">&#8220;system.decimal&#8221;</span><span style="background-color: white">:                              </span><span style="background-color: white"><span class="Apple-tab-span">					</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">					</span>tc.Attributes.Add(</span><span style="background-color: white; color: #a31515">&#8220;class&#8221;</span><span style="background-color: white">, </span><span style="background-color: white; color: #a31515">&#8220;num&#8221;</span><span style="background-color: white">);                              </span><span style="background-color: white"><span class="Apple-tab-span">					</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">					</span>break</span><span style="background-color: white">;                          </span><span style="background-color: white"><span class="Apple-tab-span">				</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">				</span>default</span><span style="background-color: white">:                              </span><span style="background-color: white"><span class="Apple-tab-span">					</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">					</span>break</span><span style="background-color: white">;                     </span><span style="background-color: white"><span class="Apple-tab-span">			</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">			</span>}                 </span><span style="background-color: white"><span class="Apple-tab-span">		</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">		</span>}            </span><span style="background-color: white"><span class="Apple-tab-span">	</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">	</span>}             </span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="white-space: pre" class="Apple-tab-span">	</span>DataGrid1.RenderControl(htw);              <span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span">	</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">	</span>StringBuilder</span><span style="background-color: white"> sb = </span><span style="background-color: white; color: blue">new</span><span style="background-color: white"> </span><span style="background-color: white; color: #2b91af">StringBuilder</span><span style="background-color: white">();              </span><span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span">	</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">	</span>sb.Append(</span><span style="background-color: white; color: #a31515">@&#8221;&lt;style&gt; &#8221;</span><span style="background-color: white">);              </span><span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span">	</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">	</span>sb.Append(</span><span style="background-color: white; color: #a31515">@&#8221; .text { mso-number-format:\@; } &#8221;</span><span style="background-color: white">);              </span><span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span">	</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">	</span>sb.Append(</span><span style="background-color: white; color: #a31515">@&#8221; .num { mso-number-format:0\.00; } &#8221;</span><span style="background-color: white">);              </span><span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span">	</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">	</span>sb.Append(</span><span style="background-color: white; color: #a31515">@&#8221; .dt { mso-number-format: &#8217;Short Date&#8217;; } &#8221;</span><span style="background-color: white">);              </span><span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span">	</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">	</span>sb.Append(</span><span style="background-color: white; color: #a31515">@&#8221;&lt;/style&gt;&#8221;</span><span style="background-color: white">);                </span><span style="background-color: white"></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">	</span>Response.Write(sb.ToString());  // write the styles to the Response           </span><span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span">	</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">	</span>Response.Write(sw.ToString());             </span><span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span">	</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">	</span>Response.Flush();              </span><span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span">	</span></span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white"><span style="white-space: pre" class="Apple-tab-span"></span><span style="white-space: pre" class="Apple-tab-span">	</span>Response.End();</span><span style="background-color: white">         </span></pre>
<pre style="background-color: white; font-family: Consolas; font-size: 13px; background-origin: initial; background-clip: initial"><span style="background-color: white">}</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://ryandev.com/export-data-from-datagrid-to-excel-and-format-the-cells/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Visual Studio Debugger Canvas</title>
		<link>http://ryandev.com/visual-studio-debugger-canvas/</link>
		<comments>http://ryandev.com/visual-studio-debugger-canvas/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 19:03:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[General Software Development]]></category>

		<category><![CDATA[Microsoft .Net]]></category>

		<guid isPermaLink="false">http://ryandev.com/visual-studio-debugger-canvas/</guid>
		<description><![CDATA[I had previously mentioned CodeBubbles which I believe will be a great addition to how we debug code.  Thankfully, Microsoft has brought this concept to Visual Studio and has called it Debugger Canvas.  Unfortunately, it is only available in the Ultimate version of Visual Studio.  http://msdn.microsoft.com/en-us/devlabs/debuggercanvas
]]></description>
			<content:encoded><![CDATA[<p>I had previously mentioned <a href="http://ryandev.com/codebubbles/" title="CodeBubbles" target="_blank">CodeBubbles</a> which I believe will be a great addition to how we debug code.  Thankfully, Microsoft has brought this concept to Visual Studio and has called it Debugger Canvas.  Unfortunately, it is only available in the Ultimate version of Visual Studio.  <a href="http://msdn.microsoft.com/en-us/devlabs/debuggercanvas" title="Debugger Canvas" target="_blank">http://msdn.microsoft.com/en-us/devlabs/debuggercanvas</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ryandev.com/visual-studio-debugger-canvas/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How To Use jQuery To Call A Function in iFrames.</title>
		<link>http://ryandev.com/how-to-use-jquery-to-call-a-function-in-iframes/</link>
		<comments>http://ryandev.com/how-to-use-jquery-to-call-a-function-in-iframes/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 08:23:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[function]]></category>

		<category><![CDATA[iframe]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[jquery iframe]]></category>

		<category><![CDATA[validate]]></category>

		<category><![CDATA[validate iframes]]></category>

		<guid isPermaLink="false">http://ryandev.com/how-to-use-jquery-to-call-a-function-in-iframes/</guid>
		<description><![CDATA[The jQuery .each() function is a great way to iterate over elements and even perform a function against them.  For example, if you have a web form that has multiple iFrames and you want to validate each of the forms all at once you can do the following jQuery call.     $(&#8220;iframe&#8221;).each(function(index) { try { this.contentWindow.Validate(); [...]]]></description>
			<content:encoded><![CDATA[<p>The jQuery <a target="_blank" href="http://api.jquery.com/jQuery.each/">.each()</a> function is a great way to iterate over elements and even perform a function against them.  For example, if you have a web form that has multiple iFrames and you want to validate each of the forms all at once you can do the following jQuery call.<span style="font-family: 'Courier New'; font-size: 10pt"><span>     </span>$(<span style="color: #a31515">&#8220;iframe&#8221;</span>).each(<span style="color: blue">function</span>(index) { <span style="color: blue">try</span> { <span style="color: blue">this</span>.contentWindow.Validate()<span style="color: #a31515"></span>; } <span style="color: blue">catch</span> (e) { } });</span>1. $(&#8221;iframe&#8221;) - will select all iFrames in a given page.2. .each() - calls a function for each iFrame3. <span style="color: blue">&#8220;this&#8221; </span>inside of the each() function actually refers to the iFrame in this case.4. <span style="color: blue">function</span>(index) { <span style="color: blue">try</span> { <span style="color: blue">this</span>.contentWindow.Validate()<span style="color: #a31515"></span>; } <span style="color: blue">catch</span> (e) { } } - This accesses the actual page of each iFrame by calling contentWindow and then the name of the function Validate.  This means that each page that is loaded in an iFrame has its own Validate JavaScript function either directly or through an includes file.5.The call to Validate() is inside a try/catch block in the event that one of the pages may not have a Validate event.  That will throw an Exception which is not important for this example.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryandev.com/how-to-use-jquery-to-call-a-function-in-iframes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>5 Tips For Effective Leadership</title>
		<link>http://ryandev.com/5-tips-for-effective-leadership/</link>
		<comments>http://ryandev.com/5-tips-for-effective-leadership/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 20:34:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Management]]></category>

		<category><![CDATA[effective leadership]]></category>

		<category><![CDATA[leadership]]></category>

		<guid isPermaLink="false">http://ryandev.com/5-tips-for-effective-leadership/</guid>
		<description><![CDATA[Unfortunately, most of my previous leaders have led by example of what NOT to do and how NOT to be an effective leader.  Currently I have good leaders which has been a wonderful change.  Below are 5 simple steps for becoming a better leader.

Admit when you are wrong: There is no more sure sign of weakness [...]]]></description>
			<content:encoded><![CDATA[<p>Unfortunately, most of my previous leaders have led by example of what <strong>NOT</strong> to do and how <strong>NOT</strong> to be an effective leader.  Currently I have good leaders which has been a wonderful change.  Below are 5 simple steps for becoming a better leader.
<ol>
<li><strong>Admit when you are wrong</strong>: There is no more sure sign of weakness in a leader than one who cannot admit when they are wrong.  It is a sign of cowardice and foolishness.  Ironically, they believe it is a sign of power and authority; however, since others know they are wrong it ends up proving that they are egotistical and cowardice.  It is very easy to admit when you are wrong.  No one expects you to be perfect and most people prefer a leader who is honest and humble with them so admitting when you are wrong is the first step to being an effective leader.  My previous &#8220;leader&#8221; taught me this lesson very well by being the opposite of what he should have been.  See <a href="http://ryandev.com/just-be-wrong/" target="_blank">here.</a></li>
<li><strong>Do not lie</strong>: One would think this would be obvious but it has amazed me at how many leaders believe lying is good.  There is a difference between not telling the complete story and lying.  It is not always necessary to share every piece of information with employees as sometimes the information may be confidential but there should never be a reason to lie.  My previous &#8220;leader&#8221; called a company meeting to chew everyone out because a database had been lost.  The network services team had not been doing the backups they were supposed to be doing and the sandbox server crashed.  My &#8220;leader&#8221; tried to make us all feel bad for screwing up by telling us that we had lost $1200 per person of profit sharing because we would have to give money back to the customer.  To make a long story short it turns out we found an old backup of the database which was exactly what we needed and even funnier was that the backup had been emailed months ago to our &#8220;leader&#8221; per his request and he had forgotten.  Not only did he never apologize but he never paid out the profit sharing since he did not now have to pay back the customer.  He never had any intention of paying us that profit sharing, he just wanted us to feel bad.  Don&#8217;t lie.  Eventually it will bite you.</li>
<li><strong>Provide clear vision of direction</strong>: The main function of a leader is to &#8220;lead&#8221;.  Leaders need to let people know where they are going and then to lead them there.  At my previous job we never had clear direction of where we were going.  We simply worked on project after project and none of them related to each other in any way so we always felt like we were bouncing around.  Leaders need to lead.  Employees will be much more effective if they understand what they are working towards.</li>
<li><strong>Communicate effectively</strong>: <a href="http://www.dilbert.com/strips/comic/2010-06-07/" target="_blank">See a recent Dilbert strip</a>.  My previous &#8220;leader&#8221; was terrible at this which is why it has made my top 5 list.  We could rarely understand what he wanted and were always confused by his emails since he very often contradicted himself in the email.  Unlike the Dilbert strip, my previous &#8220;leader&#8221; was very technical and should have been able to communicate with us well.  He was full of fancy wording but never really said anything.  Often I would send an email that required a one word or one sentence response and would get several paragraphs of &#8220;marketing&#8221; material back.  In fact, I was supposed to have been given a raise and had not yet so I asked him in email when I would and his response was &#8220;we are making minimal adjustments among managers to create additional parity.&#8221;  When I asked him to explain he quoted himself and said he had already answered me.  That was an answer?  Wow.  Turns out the answer was yes, I was getting a raise and it would be in the next paycheck but it took many paragraphs and several back and forth emails to finally get to that simple solution.  Too funny.  Even funnier was that he often lectured our team on needing to do a better job of communicating.</li>
<li><strong>Be a team player</strong>: You win as a team and you lose as a team.  A former &#8220;leader&#8221; of mine claimed that &#8220;When we win, I give you all credit and when we lose I take all of the blame.&#8221;  That is a great statement; however, in this case it was not true.  Years ago when I worked in the grocery business I had the best manager I have ever seen.  He worked right along side of us and truly lead by example.  He was a team player and because of that he was greatly respected.</li>
</ol>
<p>These 5 steps are easy to implement and should be done.  Effective leaders will self-assess from time to time and make adjustments as necessary.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryandev.com/5-tips-for-effective-leadership/feed/</wfw:commentRss>
		</item>
		<item>
		<title>jQuery Conditional Formatting</title>
		<link>http://ryandev.com/jquery-conditional-formatting/</link>
		<comments>http://ryandev.com/jquery-conditional-formatting/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 01:32:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[jQuery Conditional Formatting]]></category>

		<guid isPermaLink="false">http://ryandev.com/jquery-conditional-formatting/</guid>
		<description><![CDATA[The jQuery contains and not functions are great for doing conditional formatting.  Along with the power of chaining in jQuery you can easily change the look of something in the browser window through a simple jQuery call.
For example, suppose you have a grid view and you are grouping by a certain column and you need each [...]]]></description>
			<content:encoded><![CDATA[<p align="left">The jQuery <a target="_blank" href="http://api.jquery.com/jQuery.contains/">contains </a>and <a target="_blank" href="http://api.jquery.com/not/">not </a>functions are great for doing conditional formatting.  Along with the power of chaining in jQuery you can easily change the look of something in the browser window through a simple jQuery call.</p>
<p align="left">For example, suppose you have a grid view and you are grouping by a certain column and you need each group to total 100% in one of its columns.  (Note: I am not going into detail of which grid view control you use.)  You could do these 2 lines of code:</p>
<ol>
<li>$(&#8221;tr[type=TotalRow]:contains(&#8217;100.00%&#8217;)&#8221;).addClass(&#8221;Valid&#8221;);</li>
<li>$(&#8221;tr[type=TotalRow]:not(:contains(&#8217;100.00%&#8217;))&#8221;).addClass(&#8221;Invalid&#8221;);</li>
</ol>
<ul>
<li>$(&#8221;tr[type=TotalRow] - This will select all table rows that have an attribute named type which has a value of TotalRow.</li>
<li>:contains(&#8217;100.00%&#8217;)&#8221;) - This will further filter the list of table rows returned by ensuring that they have the text &#8216;100.00%&#8217; in them.</li>
<li>.addClass(&#8221;Valid&#8221;); - This adds a CSS class of name &#8216;Valid&#8217; to every table row that met the criteria.  In this case, every table row that has an attribute named type and a value of TotalRow as well as having the text 100.00% will have the &#8216;Valid&#8217; CSS class applied to it.</li>
</ul>
<p>The second line of code simply uses the not function so that it finds any table row that IS of type TotalRow and that does NOT have 100.00% in the row somewhere and then adds a CSS class named Invalid.</p>
<p>Pretty simple and easy to do.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryandev.com/jquery-conditional-formatting/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Just Be Wrong</title>
		<link>http://ryandev.com/just-be-wrong/</link>
		<comments>http://ryandev.com/just-be-wrong/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 01:10:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[General Software Development]]></category>

		<category><![CDATA[Management]]></category>

		<category><![CDATA[crazy boss]]></category>

		<category><![CDATA[just be wrong]]></category>

		<guid isPermaLink="false">http://ryandev.com/just-be-wrong/</guid>
		<description><![CDATA[My favorite Dilbert strip is http://www.dilbert.com/strips/comic/2009-09-04/.  At my previous job this comic strip sums up my old boss perfectly.  He was a great guy but he never could be wrong, even when he was wrong.  He was the type of guy that would change the rules just so he could be right.  I have email after email of proof [...]]]></description>
			<content:encoded><![CDATA[<p>My favorite Dilbert strip is <a target="_blank" href="http://www.dilbert.com/strips/comic/2009-09-04/">http://www.dilbert.com/strips/comic/2009-09-04/</a>.  At my previous job this comic strip sums up my old boss perfectly.  He was a great guy but he never could be wrong, even when he was wrong.  He was the type of guy that would change the rules just so he could be right.  I have email after email of proof where he says one thing and then changes it later in the thread and then denies it and then will not even admit he was wrong.  It got to the point to where it was very funny actually.</p>
<p>I think humor really is the &#8220;best medicine&#8221; for situations like this.  We cannot expect anyone to be perfect but it should not be too hard to admit when you are wrong.  Pride gets in the way but it is even more damaging when you do not admit it because it is clear to everyone else that you are wrong and yet you continue to insist you are right.  At that point, you just look like a fool.</p>
<p>When I first started my previous job there were just 5 of us.  Myself and another developer would often get emails from the boss that would not make any sense or that contradicted himself within the same email.  I used to ask what we were supposed to do and the other developer would just shrug it off.  He was used to nonsense emails from the boss.</p>
<p>2 pieces of advice:</p>
<ol>
<li>When you are wrong, just admit it.  It is not that hard to do.</li>
<li>If you have to deal with people like this especially if it is your boss I suggest you find humor in it or else you may lose your mind.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://ryandev.com/just-be-wrong/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Employee Ownership</title>
		<link>http://ryandev.com/employee-ownership/</link>
		<comments>http://ryandev.com/employee-ownership/#comments</comments>
		<pubDate>Fri, 21 May 2010 16:14:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Management]]></category>

		<category><![CDATA[employee benefits]]></category>

		<category><![CDATA[employee ownership]]></category>

		<guid isPermaLink="false">http://ryandev.com/employee-ownership/</guid>
		<description><![CDATA[I used to believe that Employee Ownership was a great incentive to work for a company.  In fact, that was the deciding factor of my previous job.  I had three other offers besides the one I took and what really made the decision for me was that I would be a part owner of the [...]]]></description>
			<content:encoded><![CDATA[<p>I used to believe that Employee Ownership was a great incentive to work for a company.  In fact, that was the deciding factor of my previous job.  I had three other offers besides the one I took and what really made the decision for me was that I would be a part owner of the company.  I took the job.</p>
<p>I then found out my boss had lied and that I would not have ownership, which is a different story altogether; however, when I found out the details of the ownership I was no longer upset about not getting ownership, I was only upset for ever taking the job.</p>
<p>The deal was you had to pay money to get the ownership.  How is that an employee benefit?  It is not.  I can own a part of any publicly traded company in the world including Microsoft, HP, IBM, etc., if I pay money.  That is referred to as buying stocks.</p>
<p>So, employee ownership can be a great benefit but <strong>not </strong>when you have to pay for it.   My previous job had supposed &#8220;employee benefits&#8221; but at the end of the day none of them were designed to benefit the employee.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryandev.com/employee-ownership/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CodeBubbles</title>
		<link>http://ryandev.com/codebubbles/</link>
		<comments>http://ryandev.com/codebubbles/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 18:41:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[General Software Development]]></category>

		<guid isPermaLink="false">http://ryandev.com/codebubbles/</guid>
		<description><![CDATA[Andrew Bragdon has come up with a very interesting way of working with code.  Check out CodeBubbles.  CodeBubbles helps bring fragments of code together instead of having to open up multiple files and solves the issue of having to trace through different files when looking for something in code.
It runs on top of Eclipse so [...]]]></description>
			<content:encoded><![CDATA[<p><span class="TinyPrint">Andrew Bragdon has come up with a very interesting way of working with code.  Check out <a target="_blank" href="http://www.cs.brown.edu/people/acb/codebubbles_site.htm">CodeBubbles</a>.  CodeBubbles helps bring fragments of code together instead of having to open up multiple files and solves the issue of having to trace through different files when looking for something in code.</span></p>
<p><span class="TinyPrint">It runs on top of Eclipse so it will not work with Visual Studio but it would be great if Microsoft created a feature similar to this in the next version of Visual Studio.</span></p>
<p><span class="TinyPrint">I wonder how well it works with larger and more complex functions.  Either way, I believe this is a great step towards improving developer efficiency.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://ryandev.com/codebubbles/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Visual Studio 2010 Multiple Monitor Support</title>
		<link>http://ryandev.com/visual-studio-2010-multiple-monitor-support/</link>
		<comments>http://ryandev.com/visual-studio-2010-multiple-monitor-support/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 13:58:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[General Software Development]]></category>

		<category><![CDATA[Microsoft .Net]]></category>

		<category><![CDATA[visual studio 2010 multiple monitors]]></category>

		<guid isPermaLink="false">http://ryandev.com/visual-studio-2010-multiple-monitor-support/</guid>
		<description><![CDATA[It is about time.  Visual Studio finally supports multiple monitors.  Most developers I know use multiple monitors as we switch between Visual Studio, email, SQL Management Studio, the Internet, etc. but now we can split code up between multiple monitors using Visual Studio 2010 and floating windows.  http://msdn.microsoft.com/en-us/library/z4y0hsax(VS.100).aspx
]]></description>
			<content:encoded><![CDATA[<p>It is about time.  Visual Studio finally supports multiple monitors.  Most developers I know use multiple monitors as we switch between Visual Studio, email, SQL Management Studio, the Internet, etc. but now we can split code up between multiple monitors using Visual Studio 2010 and floating windows.  <a target="_blank" href="http://msdn.microsoft.com/en-us/library/z4y0hsax(VS.100).aspx">http://msdn.microsoft.com/en-us/library/z4y0hsax(VS.100).aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ryandev.com/visual-studio-2010-multiple-monitor-support/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

