<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>5 Random Gotchas with the WPF DataGrid</title><link>http://blogs.msdn.com/b/vinsibal/archive/2009/04/07/5-random-gotchas-with-the-wpf-datagrid.aspx</link><description>Since the release of the WPF DataGrid there have been several common patterns of questions that developers were asking on the discussion list . I thought that I would capture some of that here so it would be easy to find. I'll also try to keep it as short</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: 5 Random Gotchas with the WPF DataGrid</title><link>http://blogs.msdn.com/b/vinsibal/archive/2009/04/07/5-random-gotchas-with-the-wpf-datagrid.aspx#9941126</link><pubDate>Fri, 25 Dec 2009 10:59:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9941126</guid><dc:creator>Amit</dc:creator><description>&lt;p&gt;I have a WPF toolkit datagrid with &amp;quot;AutoGenerateColumns&amp;quot; as TRUE. I am also using MVVM design (Grid in the view and it's the logic in the ViewModel). How can I add/edit/delete/cancel the data in the datagrid (handle the events)??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9941126" width="1" height="1"&gt;</description></item><item><title>re: 5 Random Gotchas with the WPF DataGrid</title><link>http://blogs.msdn.com/b/vinsibal/archive/2009/04/07/5-random-gotchas-with-the-wpf-datagrid.aspx#9819837</link><pubDate>Mon, 06 Jul 2009 17:10:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9819837</guid><dc:creator>Mahender</dc:creator><description>&lt;p&gt;How to wrap tooltip in datagridcell according to width of DatagridtextColumn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9819837" width="1" height="1"&gt;</description></item><item><title>re: 5 Random Gotchas with the WPF DataGrid</title><link>http://blogs.msdn.com/b/vinsibal/archive/2009/04/07/5-random-gotchas-with-the-wpf-datagrid.aspx#9548542</link><pubDate>Tue, 14 Apr 2009 16:45:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9548542</guid><dc:creator>Vincent Sibal - MSFT</dc:creator><description>&lt;p&gt;Julie,&lt;/p&gt;
&lt;p&gt;Does this post, &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/vinsibal/archive/2009/04/14/5-more-random-gotchas-with-the-wpf-datagrid.aspx"&gt;http://blogs.msdn.com/vinsibal/archive/2009/04/14/5-more-random-gotchas-with-the-wpf-datagrid.aspx&lt;/a&gt;, answer your questions regarding commit behavior?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9548542" width="1" height="1"&gt;</description></item><item><title>5 More Random Gotchas with the WPF DataGrid</title><link>http://blogs.msdn.com/b/vinsibal/archive/2009/04/07/5-random-gotchas-with-the-wpf-datagrid.aspx#9548528</link><pubDate>Tue, 14 Apr 2009 16:33:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9548528</guid><dc:creator>Vincent Sibal's Blog</dc:creator><description>&lt;p&gt;1. DataGridColumn.SortDirection does not actually sort the column. DataGridColumn.SortDirection is used&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9548528" width="1" height="1"&gt;</description></item><item><title>.NET 3.5 SP1 and WPF DataGrid CTP are out now!</title><link>http://blogs.msdn.com/b/vinsibal/archive/2009/04/07/5-random-gotchas-with-the-wpf-datagrid.aspx#9543280</link><pubDate>Fri, 10 Apr 2009 17:13:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9543280</guid><dc:creator>Vincent Sibal's Blog</dc:creator><description>&lt;p&gt;UPDATE: the WPF DataGrid v1 has just released. For more information, see this post . The information&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9543280" width="1" height="1"&gt;</description></item><item><title>Row-level commit behavior</title><link>http://blogs.msdn.com/b/vinsibal/archive/2009/04/07/5-random-gotchas-with-the-wpf-datagrid.aspx#9537797</link><pubDate>Wed, 08 Apr 2009 12:14:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9537797</guid><dc:creator>Julie</dc:creator><description>&lt;p&gt;Dear Vincent,&lt;/p&gt;
&lt;p&gt;A very useful summary indeed. If possible, could you also sometime summarize the intended commit behavior at row level ... or have it explained in the forthcoming documentation ?&lt;/p&gt;
&lt;p&gt;With regards to a row what is the standard datagrid behavior and its possible adaptations, assuming NewItemPlaceholderPosition.AtEnd:&lt;/p&gt;
&lt;p&gt;- (1) when creating a new row :&lt;/p&gt;
&lt;p&gt;	- (a) is the row committed by 'enter' and/ or by 'tab' (*) ?&lt;/p&gt;
&lt;p&gt;	- (b) if the row is committed only by 'enter' (e.g.), is it possible to commit it with 'tab'; if yes what is the recommended manner of doing ? (previewkeydown override 'tab' to 'enter' in the last editable cell ?)&lt;/p&gt;
&lt;p&gt;	 &amp;nbsp;(c) if the user uses another key like 'arrow up/down/right/left' or 'skip/tab', should the row loose focus and commit as well ?&lt;/p&gt;
&lt;p&gt;	- (d) when entering the next row after commit, the standard behavior is for the datagrid to set focus in the same column; is it ok to force the first (or any other) editable cell to get focus; &amp;nbsp;if yes what is the recommended manner of doing ?&lt;/p&gt;
&lt;p&gt;- (2) same questions when updating an existing row&lt;/p&gt;
&lt;p&gt;Thanks so much,&lt;/p&gt;
&lt;p&gt;Julie&lt;/p&gt;
&lt;p&gt;(*) 'tab' means in this context that the datagrid will, when on the last possible editable cell (brought into view), skip over any 'IsReadOnly' column (even invisible and virtualized), out of the row to the next row&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9537797" width="1" height="1"&gt;</description></item><item><title>5 Random Gotchas with the WPF DataGrid </title><link>http://blogs.msdn.com/b/vinsibal/archive/2009/04/07/5-random-gotchas-with-the-wpf-datagrid.aspx#9536539</link><pubDate>Tue, 07 Apr 2009 22:38:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9536539</guid><dc:creator>DotNetKicks.com</dc:creator><description>&lt;p&gt;You've been kicked (a good thing) - Trackback from DotNetKicks.com&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9536539" width="1" height="1"&gt;</description></item><item><title>5 Random Gotchas with the WPF DataGrid | ASP NET Hosting</title><link>http://blogs.msdn.com/b/vinsibal/archive/2009/04/07/5-random-gotchas-with-the-wpf-datagrid.aspx#9536006</link><pubDate>Tue, 07 Apr 2009 17:26:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9536006</guid><dc:creator>5 Random Gotchas with the WPF DataGrid | ASP NET Hosting</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://asp-net-hosting.simplynetdev.com/5-random-gotchas-with-the-wpf-datagrid/"&gt;http://asp-net-hosting.simplynetdev.com/5-random-gotchas-with-the-wpf-datagrid/&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9536006" width="1" height="1"&gt;</description></item></channel></rss>