<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4013717914996938103</id><updated>2011-11-28T00:56:40.595+01:00</updated><category term='Google Dictionary'/><category term='define'/><category term='Google Chrome'/><category term='howto'/><category term='.Net Compact Framework'/><title type='text'>Dan Dohotaru's Web Log</title><subtitle type='html'>Ramblings about the existence of the negative evolution that is not involution</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dandohotaru.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4013717914996938103/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dandohotaru.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Dan Dohotaru</name><uri>http://www.blogger.com/profile/08914720622370933794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4013717914996938103.post-9197739597949735088</id><published>2011-08-08T19:38:00.001+02:00</published><updated>2011-08-08T19:42:53.205+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='define'/><category scheme='http://www.blogger.com/atom/ns#' term='howto'/><category scheme='http://www.blogger.com/atom/ns#' term='Google Dictionary'/><category scheme='http://www.blogger.com/atom/ns#' term='Google Chrome'/><title type='text'>Google Dictionary is gone. Long live Search by provider</title><content type='html'>... Google and friends in this episode&lt;br /&gt;&lt;br /&gt;I don't know about you but I care about knowing what that %s word means beyond meanings.&lt;br /&gt;Therefore I used to be a regular fan of google dictionary that seems to be defunct nowadays.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-LED5zVDrRmw/TkAWHXQ3jWI/AAAAAAAAEV4/V9V8WXxiSl4/s1600/Google+Dictionary+no+longer+available.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="143" src="http://1.bp.blogspot.com/-LED5zVDrRmw/TkAWHXQ3jWI/AAAAAAAAEV4/V9V8WXxiSl4/s320/Google+Dictionary+no+longer+available.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Though I never actually visited the site directly but always used predefined search engines for the url bar eventually achieving something like the one below&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Sample for &lt;a href="http://www.google.com/dictionary?langpair=en|en&amp;amp;q=test&amp;amp;hl=en&amp;amp;aq=f"&gt;test&lt;/a&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;define d as a search engine using such an &lt;a href="http://www.google.com/dictionary?langpair=en|en&amp;amp;q=%s&amp;amp;hl=en&amp;amp;aq=f"&gt;option&lt;/a&gt;&amp;nbsp;(see url) in search engines settings&amp;nbsp;(&lt;a href="http://www.google.com/support/chrome/bin/answer.py?answer=95653"&gt;how to&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;d + TAB + keyword + Return/Enter =&amp;amp;gt; results shown&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;While I was reading on &lt;a href="http://googlesystem.blogspot.com/2011/08/no-more-standalone-google-dictionary.html"&gt;gos&lt;/a&gt; about the soon long&amp;nbsp;forgotten&amp;nbsp;favorite web app of mine I remembered about the &lt;a href="http://www.google.com/support/forum/p/Web%20Search/thread?tid=55fc3d95d56b2a2d&amp;amp;hl=en"&gt;define&lt;/a&gt; keyword&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Sample for &lt;a href="http://www.google.com/#sclient=psy&amp;amp;hl=en&amp;amp;tbs=dfn:1&amp;amp;source=hp&amp;amp;q=test&amp;amp;pbx=1&amp;amp;oq=test&amp;amp;aq=f&amp;amp;aqi=g10&amp;amp;aql=&amp;amp;gs_sm=e&amp;amp;gs_upl=36142l52719l1l54865l16l13l0l1l1l0l171l1106l9.3l12l0&amp;amp;fp=1&amp;amp;biw=1280&amp;amp;bih=963&amp;amp;bav=on.2,or.r_gc.r_pw.r_cp.&amp;amp;cad=b"&gt;test&lt;/a&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;define def as a search engine using such an &lt;a href="http://www.google.com/#sclient=psy&amp;amp;hl=en&amp;amp;tbs=dfn:1&amp;amp;source=hp&amp;amp;q=%s&amp;amp;pbx=1&amp;amp;oq=%s&amp;amp;aq=f&amp;amp;aqi=g10&amp;amp;aql=&amp;amp;gs_sm=e&amp;amp;gs_upl=36142l52719l1l54865l16l13l0l1l1l0l171l1106l9.3l12l0&amp;amp;bav=on.2,or.r_gc.r_pw.r_cp.&amp;amp;fp=ad7c19c42f01f3ff&amp;amp;biw=1280&amp;amp;bih=963"&gt;option&lt;/a&gt;&amp;nbsp;(see url while&amp;nbsp;your millage may vary) in search engines settings&amp;nbsp;(&lt;a href="http://www.google.com/support/chrome/bin/answer.py?answer=95653"&gt;how to&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;def + TAB + keyword + Return/Enter =&amp;amp;gt; results shown&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;What was that &lt;a href="http://www.google.com/#sclient=psy&amp;amp;hl=en&amp;amp;tbs=dfn:1&amp;amp;source=hp&amp;amp;q=rambling&amp;amp;pbx=1&amp;amp;oq=rambling&amp;amp;aq=f&amp;amp;aqi=g-e2g4g-s1g2g-s1&amp;amp;aql=&amp;amp;gs_sm=e&amp;amp;gs_upl=1741l1741l0l1975l1l1l0l0l0l0l37l37l1l1l0&amp;amp;bav=on.2,or.r_gc.r_pw.r_cp.&amp;amp;fp=ad7c19c42f01f3ff&amp;amp;biw=1280&amp;amp;bih=963"&gt;rambling&lt;/a&gt; again for?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4013717914996938103-9197739597949735088?l=dandohotaru.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dandohotaru.blogspot.com/feeds/9197739597949735088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4013717914996938103&amp;postID=9197739597949735088' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4013717914996938103/posts/default/9197739597949735088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4013717914996938103/posts/default/9197739597949735088'/><link rel='alternate' type='text/html' href='http://dandohotaru.blogspot.com/2011/08/google-dictionary-is-gone-long-live.html' title='Google Dictionary is gone. Long live Search by provider'/><author><name>Dan Dohotaru</name><uri>http://www.blogger.com/profile/08914720622370933794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-LED5zVDrRmw/TkAWHXQ3jWI/AAAAAAAAEV4/V9V8WXxiSl4/s72-c/Google+Dictionary+no+longer+available.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4013717914996938103.post-3742592082045236745</id><published>2007-11-21T18:40:00.000+01:00</published><updated>2007-11-22T23:17:56.713+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net Compact Framework'/><title type='text'>Caching Opened Forms in .Net Compact Framework</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_SRXnWYQYUgc/R0RRpL_QhAI/AAAAAAAAA9A/8ObQloDMkf8/s1600-h/OpenedForms.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp2.blogger.com/_SRXnWYQYUgc/R0RRpL_QhAI/AAAAAAAAA9A/8ObQloDMkf8/s320/OpenedForms.gif" alt="" id="BLOGGER_PHOTO_ID_5135319243143808002" border="0" /&gt;&lt;/a&gt;Recently i came across the necessity to create a multi form wizard style application for Compact Framework and realized that there is no such concept as OpenedForms (found &lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2422287&amp;amp;SiteID=1"&gt;this&lt;/a&gt; post also on Msdn Forums), so i had to do it on my own. For this i needed something generic, easy to handle with as little code as possible. In the same time i was preoccupied on having  the same "look and feel" on all forms. Therefore i created a BaseForm with the visual styles i needed in all the other forms. Besides that have a FormController to handle the form creation and do all the caching. As you'll see in the &lt;a href="http://dan.dohotaru.googlepages.com/OpenedFormsTestApplication.rar"&gt;test solution&lt;/a&gt; to achieve that all i needed to do was to overrite the OnLoad and OnClosing handler of the base form where i have the logic for adding or removing the forms from cache.&lt;br /&gt;The following code is a snippet from the BaseFor&lt;blockquote&gt;&lt;/blockquote&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;protected&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;override&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;void&lt;/span&gt;&lt;span style="font-size:85%;"&gt; OnLoad(EventArgs e)&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;try&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;using&lt;/span&gt;&lt;span style="font-size:85%;"&gt; (&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;new&lt;/span&gt;&lt;span style="font-size:85%;"&gt; WaitCursor())&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;base&lt;/span&gt;&lt;span style="font-size:85%;"&gt;.OnLoad(e);&lt;br /&gt;    &lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;if&lt;/span&gt;&lt;span style="font-size:85%;"&gt; (&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;this&lt;/span&gt;&lt;span style="font-size:85%;"&gt; != &lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;null&lt;/span&gt;&lt;span style="font-size:85%;"&gt;)&lt;br /&gt;FormController.AddOpenedForm(&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;this&lt;/span&gt;&lt;span style="font-size:85%;"&gt;);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;catch&lt;/span&gt;&lt;span style="font-size:85%;"&gt; (Exception exception)&lt;br /&gt;{&lt;br /&gt;MessageBox.Show(exception.Message);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;protected&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;override&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;void&lt;/span&gt;&lt;span style="font-size:85%;"&gt; OnClosed(EventArgs e)&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;try&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;using&lt;/span&gt;&lt;span style="font-size:85%;"&gt; (&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;new&lt;/span&gt;&lt;span style="font-size:85%;"&gt; WaitCursor())&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;if&lt;/span&gt;&lt;span style="font-size:85%;"&gt; (&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;this&lt;/span&gt;&lt;span style="font-size:85%;"&gt; != &lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;null&lt;/span&gt;&lt;span style="font-size:85%;"&gt;)&lt;br /&gt;    FormController.RemoveOpenedForm(&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;this&lt;/span&gt;&lt;span style="font-size:85%;"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;base&lt;/span&gt;&lt;span style="font-size:85%;"&gt;.OnClosed(e);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;catch&lt;/span&gt;&lt;span style="font-size:85%;"&gt; (Exception ex)&lt;br /&gt;{&lt;br /&gt;MessageBox.Show(ex.Message);&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;The following code is a snippet for Form creation&lt;br /&gt;&lt;t&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;br /&gt;&lt;/t&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;public&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;static&lt;/span&gt;&lt;span style="font-size:85%;"&gt; T CreateForm() &lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;where&lt;/span&gt;&lt;span style="font-size:85%;"&gt; T : BaseForm&lt;br /&gt;{&lt;br /&gt;T formToOpen = &lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;null&lt;/span&gt;&lt;span style="font-size:85%;"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;try&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;foreach&lt;/span&gt;&lt;span style="font-size:85%;"&gt; (BaseForm openedForm &lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;in&lt;/span&gt;&lt;span style="font-size:85%;"&gt; openedForms)&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;if&lt;/span&gt;&lt;span style="font-size:85%;"&gt; (openedForm.GetType() == &lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;typeof&lt;/span&gt;&lt;span style="font-size:85%;"&gt;(T))&lt;br /&gt;{&lt;br /&gt;    formToOpen = openedForm &lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;as&lt;/span&gt;&lt;span style="font-size:85%;"&gt; T;&lt;br /&gt;    &lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;return&lt;/span&gt;&lt;span style="font-size:85%;"&gt; formToOpen;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;Type type = &lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;typeof&lt;/span&gt;&lt;span style="font-size:85%;"&gt;(T);&lt;br /&gt;formToOpen = Activator.CreateInstance(type) &lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;as&lt;/span&gt;&lt;span style="font-size:85%;"&gt; T;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;catch&lt;/span&gt;&lt;span style="font-size:85%;"&gt; (Exception ex)&lt;br /&gt;{&lt;br /&gt;MessageBox.Show(ex.Message);&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;return&lt;/span&gt;&lt;span style="font-size:85%;"&gt; formToOpen;&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;All in all, after having all that put in place, to  create a new form  (derived from BaseForm) and have it added to OpenedForms collection, all i needed to do was to write something like this&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;BaseForm form1 = FormController.CreateForm();&lt;br /&gt;form1.Show();&lt;/span&gt;&lt;/pre&gt;&lt;form1&gt;&lt;br /&gt;&lt;br /&gt;and to close them i have several options, depending on the scenario&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;br /&gt;&lt;/form1&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;FormController.Close(form1);&lt;br /&gt;FormController.CloseAllButThis(&lt;/span&gt;&lt;span class="kwrd"  style="font-size:85%;"&gt;this&lt;/span&gt;&lt;span style="font-size:85%;"&gt;);&lt;br /&gt;FormController.CloseAll();&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;For details about all this or if you are curious about the implementation, download the TestSolution form &lt;a href="http://dan.dohotaru.googlepages.com/OpenedFormsTestApplication.rar"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4013717914996938103-3742592082045236745?l=dandohotaru.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dandohotaru.blogspot.com/feeds/3742592082045236745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4013717914996938103&amp;postID=3742592082045236745' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4013717914996938103/posts/default/3742592082045236745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4013717914996938103/posts/default/3742592082045236745'/><link rel='alternate' type='text/html' href='http://dandohotaru.blogspot.com/2007/11/caching-opened-forms-in-net-compact.html' title='Caching Opened Forms in .Net Compact Framework'/><author><name>Dan Dohotaru</name><uri>http://www.blogger.com/profile/08914720622370933794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_SRXnWYQYUgc/R0RRpL_QhAI/AAAAAAAAA9A/8ObQloDMkf8/s72-c/OpenedForms.gif' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4013717914996938103.post-8345585279182579928</id><published>2007-11-16T13:07:00.000+01:00</published><updated>2007-11-21T22:28:52.868+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net Compact Framework'/><title type='text'>Remove DataGrid auto selection on first row after binding</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_SRXnWYQYUgc/Rz2YNb_Qg_I/AAAAAAAAA8A/AXBreAudt5c/s1600-h/DataGrid1.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp0.blogger.com/_SRXnWYQYUgc/Rz2YNb_Qg_I/AAAAAAAAA8A/AXBreAudt5c/s320/DataGrid1.jpg" alt="" id="BLOGGER_PHOTO_ID_5133426506891035634" border="0" /&gt;&lt;/a&gt;Yesterday i had an issue related with having a filtering user control built with cascading datagrids (see image). Maybe not a very elegant idea, but it was a specific request from a customer, so i had to go that way.&lt;br /&gt;It had to work like the following scenario: Clicking on one of the cascading dataGrids was suppose to bind only the entity clicked, while showing the next dataGrid filled with some filtered data based on the previous selection. Selecting an entity in the next grid would have repeated the scenario till the lowest level of the filters is reached. Clicking on the column header on the other hand should have reset the filter up to that level and hide the child grids.  All in all, having a row selected or not (visually speaking) had a great impact on using the control, but unfortunately, after binding, a focused dataGrid auto selects the first row. Clicking on a row and then on the column header, made the first cell on the first row selected, while my scenario implied having nothing selected. I posted my problem on Msdn CF forums  &lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2414751&amp;amp;SiteID=1"&gt;here&lt;/a&gt; and eventualy built a small application to demonstrate the behavior i wanted. The problem was still there, isolated from my project. I was already thinking about overriding the Paint events or something similar (dataGrid.Unselect(rowIndex) didn't work of course), while one of my colleagues suggested "Maybe it's a focus problem, set the focus on another control after binding". So now i have a dummy control (label with empty .Text property) which is programaticaly focused after binding. The grid looses focus, "clears the selection", my problem solved. Again, not a very elegant solution, but it's a quick workaround that solved my problem, at least for now&lt;br /&gt;When i'll have the time, I'll take a dive into the DataGrid control and analyze what's happening behind the code.&lt;br /&gt;&lt;br /&gt;You can download the test solution &lt;a href="http://80.97.144.82/test/TestApplication.rar"&gt;here&lt;/a&gt;, run it and see what i was facing with. Uncomment dummyLabel.Focus(); lines, and run it again. This time you'll have the behavior i was looking for.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4013717914996938103-8345585279182579928?l=dandohotaru.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dandohotaru.blogspot.com/feeds/8345585279182579928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4013717914996938103&amp;postID=8345585279182579928' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4013717914996938103/posts/default/8345585279182579928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4013717914996938103/posts/default/8345585279182579928'/><link rel='alternate' type='text/html' href='http://dandohotaru.blogspot.com/2007/11/datagrid-remove-selection-on-first-row.html' title='Remove DataGrid auto selection on first row after binding'/><author><name>Dan Dohotaru</name><uri>http://www.blogger.com/profile/08914720622370933794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_SRXnWYQYUgc/Rz2YNb_Qg_I/AAAAAAAAA8A/AXBreAudt5c/s72-c/DataGrid1.jpg' height='72' width='72'/><thr:total>3</thr:total></entry></feed>
