<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: WPF DataGrid &#8211; detecting the column, cell and row that has been clicked</title>
	<atom:link href="http://www.scottlogic.co.uk/blog/colin/2008/12/wpf-datagrid-detecting-clicked-cell-and-row/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scottlogic.co.uk/blog/colin/2008/12/wpf-datagrid-detecting-clicked-cell-and-row/</link>
	<description>Colin Eberhardt&#039;s Adventures in WPF</description>
	<lastBuildDate>Fri, 23 Jul 2010 03:32:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Colin Eberhardt</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2008/12/wpf-datagrid-detecting-clicked-cell-and-row/#comment-15896</link>
		<dc:creator>Colin Eberhardt</dc:creator>
		<pubDate>Tue, 13 Jul 2010 07:22:23 +0000</pubDate>
		<guid isPermaLink="false">http://wpfadventures.wordpress.com/?p=59#comment-15896</guid>
		<description>@grix,

Try posting your question in the Silverlight forums:
http://forums.silverlight.net/forums/

Colin E.</description>
		<content:encoded><![CDATA[<p>@grix,</p>
<p>Try posting your question in the Silverlight forums:<br />
<a href="http://forums.silverlight.net/forums/" rel="nofollow">http://forums.silverlight.net/forums/</a></p>
<p>Colin E.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brix</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2008/12/wpf-datagrid-detecting-clicked-cell-and-row/#comment-15860</link>
		<dc:creator>brix</dc:creator>
		<pubDate>Mon, 12 Jul 2010 19:44:25 +0000</pubDate>
		<guid isPermaLink="false">http://wpfadventures.wordpress.com/?p=59#comment-15860</guid>
		<description>Hi,
Need to detect editing a cell and bind to a command in a mvvm pattern.
Can be done?
Thanks for your time</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Need to detect editing a cell and bind to a command in a mvvm pattern.<br />
Can be done?<br />
Thanks for your time</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin Eberhardt</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2008/12/wpf-datagrid-detecting-clicked-cell-and-row/#comment-12021</link>
		<dc:creator>Colin Eberhardt</dc:creator>
		<pubDate>Wed, 09 Jun 2010 10:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://wpfadventures.wordpress.com/?p=59#comment-12021</guid>
		<description>Thanks George - a useful addition.</description>
		<content:encoded><![CDATA[<p>Thanks George &#8211; a useful addition.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2008/12/wpf-datagrid-detecting-clicked-cell-and-row/#comment-11964</link>
		<dc:creator>George</dc:creator>
		<pubDate>Mon, 07 Jun 2010 21:27:29 +0000</pubDate>
		<guid isPermaLink="false">http://wpfadventures.wordpress.com/?p=59#comment-11964</guid>
		<description>I was trying to find the row number of the selected DataGrid item. This article was the closest thing I could find by searching. The problem was I use a context menu (not a mouse click) to initiate the routine that needs to know the row number. After a day of experimenting, I finally came up with this code that seems to be the simplest method to determine the row number.

            DataRowView prop = (DataRowView)myDataGrid.SelectedValue;
            DataRow rowData =(DataRow)prop.Row;
            int selectedRow = _myDataTable.Rows.IndexOf(rowData);

myDataGrid is the grid name. _myDataTable is the name of the datatable to fills the grid.

Hope this helps someone else.</description>
		<content:encoded><![CDATA[<p>I was trying to find the row number of the selected DataGrid item. This article was the closest thing I could find by searching. The problem was I use a context menu (not a mouse click) to initiate the routine that needs to know the row number. After a day of experimenting, I finally came up with this code that seems to be the simplest method to determine the row number.</p>
<p>            DataRowView prop = (DataRowView)myDataGrid.SelectedValue;<br />
            DataRow rowData =(DataRow)prop.Row;<br />
            int selectedRow = _myDataTable.Rows.IndexOf(rowData);</p>
<p>myDataGrid is the grid name. _myDataTable is the name of the datatable to fills the grid.</p>
<p>Hope this helps someone else.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin Eberhardt</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2008/12/wpf-datagrid-detecting-clicked-cell-and-row/#comment-11238</link>
		<dc:creator>Colin Eberhardt</dc:creator>
		<pubDate>Tue, 18 May 2010 07:26:21 +0000</pubDate>
		<guid isPermaLink="false">http://wpfadventures.wordpress.com/?p=59#comment-11238</guid>
		<description>That&#039;s  a simple one ... WPF != WinForms</description>
		<content:encoded><![CDATA[<p>That&#8217;s  a simple one &#8230; WPF != WinForms</p>
]]></content:encoded>
	</item>
</channel>
</rss>
