<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Rob Van Mieghem's Blog</title>
	<atom:link href="http://10stupidthings.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://10stupidthings.wordpress.com</link>
	<description>Just another weblog</description>
	<lastBuildDate>Fri, 28 Oct 2011 09:41:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='10stupidthings.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Rob Van Mieghem's Blog</title>
		<link>http://10stupidthings.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://10stupidthings.wordpress.com/osd.xml" title="Rob Van Mieghem&#039;s Blog" />
	<atom:link rel='hub' href='http://10stupidthings.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Running/installing google chrome on a pc with no/limited internetconnection</title>
		<link>http://10stupidthings.wordpress.com/2008/09/03/runninginstalling-google-chrome-on-a-pc-with-nolimited-internetconnection/</link>
		<comments>http://10stupidthings.wordpress.com/2008/09/03/runninginstalling-google-chrome-on-a-pc-with-nolimited-internetconnection/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 08:30:52 +0000</pubDate>
		<dc:creator>10stupidthings</dc:creator>
				<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://10stupidthings.wordpress.com/?p=7</guid>
		<description><![CDATA[Google chrome installs itself by dowloading a small (475kb) setup but it&#8217;s just a bootstrap. It fetches the rest during installation. If you&#8217;re like me and on a company intranet where downloading executables,&#8230; is not allowed, just copying the ChromeSetup.exe isn&#8217;t sufficient.  Easy I thought, I&#8217;ll just install it on another pc and copy the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=10stupidthings.wordpress.com&amp;blog=1304276&amp;post=7&amp;subd=10stupidthings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Google chrome installs itself by dowloading a small (475kb) setup but it&#8217;s just a bootstrap. It fetches the rest during installation.</p>
<p>If you&#8217;re like me and on a company intranet where downloading executables,&#8230; is not allowed, just copying the ChromeSetup.exe isn&#8217;t sufficient. </p>
<p>Easy I thought, I&#8217;ll just install it on another pc and copy the installation folder (look at where the link on your start menu points to). </p>
<p>This doesn&#8217;t quite solve it, chrome.exe refuses to fire up on the pc I copied chrome to.</p>
<p>Apparently it doesn&#8217;t load/find the required dll&#8217;s. Copy the chrome.exe to the 0.2.149.27 folder and start it from there. There it is!</p>
<p>PS: I have no idea what side effects this may have and take absolutely no responsibilty if this screws up your machine, blows up the coffee machine,&#8230;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/10stupidthings.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/10stupidthings.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/10stupidthings.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/10stupidthings.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/10stupidthings.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/10stupidthings.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/10stupidthings.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/10stupidthings.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/10stupidthings.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/10stupidthings.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/10stupidthings.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/10stupidthings.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/10stupidthings.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/10stupidthings.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/10stupidthings.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/10stupidthings.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=10stupidthings.wordpress.com&amp;blog=1304276&amp;post=7&amp;subd=10stupidthings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://10stupidthings.wordpress.com/2008/09/03/runninginstalling-google-chrome-on-a-pc-with-nolimited-internetconnection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c9c0d3008adc348fb385349e8b231052?s=96&#38;d=identicon" medium="image">
			<media:title type="html">10stupidthings</media:title>
		</media:content>
	</item>
		<item>
		<title>Gridview and dynamic controls</title>
		<link>http://10stupidthings.wordpress.com/2007/07/18/gridview-and-dynamic-controls/</link>
		<comments>http://10stupidthings.wordpress.com/2007/07/18/gridview-and-dynamic-controls/#comments</comments>
		<pubDate>Wed, 18 Jul 2007 19:50:07 +0000</pubDate>
		<dc:creator>10stupidthings</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Visual Studio 2005]]></category>

		<guid isPermaLink="false">http://10stupidthings.wordpress.com/2007/07/18/gridview-and-dynamic-controls/</guid>
		<description><![CDATA[Well, I was refactoring some code today and wanted to convert an htmlbutton dynamically added to a gridview with autogenerated columns to an asp.net button so it could easily trigger serverside events. During this process I stumbled on some weird gridview behaviour. When accessing the Rows property of the gridview when the rows aren&#8217;t yet [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=10stupidthings.wordpress.com&amp;blog=1304276&amp;post=5&amp;subd=10stupidthings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Well, I was refactoring some code today and wanted to convert an htmlbutton dynamically added to a gridview with autogenerated columns to an asp.net button so it could easily trigger serverside events.<br />
During this process I stumbled on some weird gridview behaviour.<br />
When accessing the Rows property of the gridview when the rows aren&#8217;t yet reconstructed, the Rows collection is immediately initialized with an empty one and the original rows aren&#8217;t recreated further in the gridview lifecycle. When the gridview is rendered again at the end of the requestcycle, the rows have disappeared.</p>
<p>Normally one would recreate the buttons in the OnInit but the gridview hasn&#8217;t reconstructed its rows collections yet and merely touching it clears it for good.</p>
<p>The solution is to recreate the buttons in OnPreload.<br />
The gridviews Rows collection is already fully recreated and it&#8217;s still early enough to let asp.net trigger the buttons Click event.</p>
<p><strong>Small sample:</strong><br />
If I would use the following code to create the buttons on the gridview:<br />
<code><br />
private void EnsureButtons()<br />
{<br />
foreach (GridViewRow row in GridView1.Rows)<br />
{<br />
if (row.RowType == DataControlRowType.DataRow)<br />
{<br />
if (GetButton(row) == null)<br />
{<br />
row.Cells[0].Controls.Add(CreateButton(row));<br />
}<br />
}<br />
}<br />
}</code><code>private Button GetButton(GridViewRow row)<br />
{<br />
return row.Cells[0].FindControl("DynamicallyCreatedButton_" + row.RowIndex) as Button;<br />
}</p>
<p>private Button CreateButton(GridViewRow row)<br />
{<br />
Button button = new Button();<br />
button.Text = "Dynamic Button";<br />
button.ID = "DynamicallyCreatedButton_" + row.RowIndex;<br />
button.Click += new EventHandler(button_Click);<br />
return button;<br />
}</p>
<p>void button_Click(object sender, EventArgs e)<br />
{<br />
Label1.Text = "Text set from dynamic button Click event";<br />
}</p>
<p></code>I can create the buttons during the initial page request or after a new databind in the gridview prerender event:<br />
<code><br />
protected void GridView1_PreRender(object sender, EventArgs e)<br />
{<br />
EnsureButtons();<br />
}<br />
</code></p>
<p>And recreate them during postback in the OnPreLoad<br />
<code><br />
protected override void OnPreLoad(EventArgs e)<br />
{<br />
EnsureButtons();<br />
base.OnPreLoad(e);<br />
}<br />
</code></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/10stupidthings.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/10stupidthings.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/10stupidthings.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/10stupidthings.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/10stupidthings.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/10stupidthings.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/10stupidthings.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/10stupidthings.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/10stupidthings.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/10stupidthings.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/10stupidthings.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/10stupidthings.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/10stupidthings.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/10stupidthings.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/10stupidthings.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/10stupidthings.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=10stupidthings.wordpress.com&amp;blog=1304276&amp;post=5&amp;subd=10stupidthings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://10stupidthings.wordpress.com/2007/07/18/gridview-and-dynamic-controls/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c9c0d3008adc348fb385349e8b231052?s=96&#38;d=identicon" medium="image">
			<media:title type="html">10stupidthings</media:title>
		</media:content>
	</item>
	</channel>
</rss>
