<?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: Multiselect DataGrid with CheckBoxes</title>
	<atom:link href="http://www.scottlogic.co.uk/blog/colin/2008/11/multiselect-datagrid-with-checkboxes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scottlogic.co.uk/blog/colin/2008/11/multiselect-datagrid-with-checkboxes/</link>
	<description>Colin Eberhardt&#039;s Adventures in .NET</description>
	<lastBuildDate>Thu, 09 Feb 2012 03:02:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: abc</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2008/11/multiselect-datagrid-with-checkboxes/#comment-21331</link>
		<dc:creator>abc</dc:creator>
		<pubDate>Thu, 07 Oct 2010 06:59:09 +0000</pubDate>
		<guid isPermaLink="false">http://wpfadventures.wordpress.com/?p=6#comment-21331</guid>
		<description>i need a code how to select all Row using Check box in silverlight4</description>
		<content:encoded><![CDATA[<p>i need a code how to select all Row using Check box in silverlight4</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: abc</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2008/11/multiselect-datagrid-with-checkboxes/#comment-21330</link>
		<dc:creator>abc</dc:creator>
		<pubDate>Thu, 07 Oct 2010 06:56:49 +0000</pubDate>
		<guid isPermaLink="false">http://wpfadventures.wordpress.com/?p=6#comment-21330</guid>
		<description>good</description>
		<content:encoded><![CDATA[<p>good</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin Eberhardt</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2008/11/multiselect-datagrid-with-checkboxes/#comment-985</link>
		<dc:creator>Colin Eberhardt</dc:creator>
		<pubDate>Fri, 08 May 2009 07:43:49 +0000</pubDate>
		<guid isPermaLink="false">http://wpfadventures.wordpress.com/?p=6#comment-985</guid>
		<description>@van,

It should be a relatively straightforward task to add a checkbox, which, when clicked iterates over all the DataGridRow&#039;s and sets there IsSelected property accordingly. Sorry - but I do not have the time to actually write the code for you. If you get stuck, there are lots of helpful people on the WPF Toolkit forums:

http://www.codeplex.com/wpf/Thread/List.aspx

Regards, Colin E.</description>
		<content:encoded><![CDATA[<p>@van,</p>
<p>It should be a relatively straightforward task to add a checkbox, which, when clicked iterates over all the DataGridRow&#8217;s and sets there IsSelected property accordingly. Sorry &#8211; but I do not have the time to actually write the code for you. If you get stuck, there are lots of helpful people on the WPF Toolkit forums:</p>
<p><a href="http://www.codeplex.com/wpf/Thread/List.aspx" rel="nofollow">http://www.codeplex.com/wpf/Thread/List.aspx</a></p>
<p>Regards, Colin E.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: van</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2008/11/multiselect-datagrid-with-checkboxes/#comment-980</link>
		<dc:creator>van</dc:creator>
		<pubDate>Thu, 07 May 2009 23:00:40 +0000</pubDate>
		<guid isPermaLink="false">http://wpfadventures.wordpress.com/?p=6#comment-980</guid>
		<description>I need the code in wpf which should display the checkbox in the header which will perform to  select all checkboxes.if uncheck the deselect all the selected in the datagrid.

Ex: Check all Checkbox control</description>
		<content:encoded><![CDATA[<p>I need the code in wpf which should display the checkbox in the header which will perform to  select all checkboxes.if uncheck the deselect all the selected in the datagrid.</p>
<p>Ex: Check all Checkbox control</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ceberhardt</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2008/11/multiselect-datagrid-with-checkboxes/#comment-148</link>
		<dc:creator>ceberhardt</dc:creator>
		<pubDate>Thu, 05 Mar 2009 08:30:33 +0000</pubDate>
		<guid isPermaLink="false">http://wpfadventures.wordpress.com/?p=6#comment-148</guid>
		<description>Hi Avijit,

In order to bind a value of &#039;Y&#039; or &#039;N&#039; to your checkbox column you will need a small class called a value converter. There are lots of articles / blog posts that show you how to use ValueConverters. Try reading the following:

http://www.codeproject.com/KB/WPF/OppositeBoolConverter.aspx

Also, a good place to ask WPF DataGrid questions is the codeplex forum here:

http://www.codeplex.com/wpf/Thread/View.aspx

Regards, Colin E.</description>
		<content:encoded><![CDATA[<p>Hi Avijit,</p>
<p>In order to bind a value of &#8216;Y&#8217; or &#8216;N&#8217; to your checkbox column you will need a small class called a value converter. There are lots of articles / blog posts that show you how to use ValueConverters. Try reading the following:</p>
<p><a href="http://www.codeproject.com/KB/WPF/OppositeBoolConverter.aspx" rel="nofollow">http://www.codeproject.com/KB/WPF/OppositeBoolConverter.aspx</a></p>
<p>Also, a good place to ask WPF DataGrid questions is the codeplex forum here:</p>
<p><a href="http://www.codeplex.com/wpf/Thread/View.aspx" rel="nofollow">http://www.codeplex.com/wpf/Thread/View.aspx</a></p>
<p>Regards, Colin E.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Avijit</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2008/11/multiselect-datagrid-with-checkboxes/#comment-140</link>
		<dc:creator>Avijit</dc:creator>
		<pubDate>Wed, 04 Mar 2009 07:40:12 +0000</pubDate>
		<guid isPermaLink="false">http://wpfadventures.wordpress.com/?p=6#comment-140</guid>
		<description>Hi,
I am facing a problem.I am using the WPF datagrid with a checkbox column. Now I have to select the checkbox on the basis of a recordset column value(i.e. if the value for one row is &#039;Y&#039; then the checkbox should be checked andd if it is &#039;N&#039; then it should remain unchecked). Could you please help me out.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I am facing a problem.I am using the WPF datagrid with a checkbox column. Now I have to select the checkbox on the basis of a recordset column value(i.e. if the value for one row is &#8216;Y&#8217; then the checkbox should be checked andd if it is &#8216;N&#8217; then it should remain unchecked). Could you please help me out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ceberhardt</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2008/11/multiselect-datagrid-with-checkboxes/#comment-17</link>
		<dc:creator>ceberhardt</dc:creator>
		<pubDate>Fri, 16 Jan 2009 16:12:48 +0000</pubDate>
		<guid isPermaLink="false">http://wpfadventures.wordpress.com/?p=6#comment-17</guid>
		<description>Hi,

The DataGrid should already have a button in the top left corner that provides &#039;select all&#039; functionality. If you want to change this to a checkbox you will have to change the control template for the DataGrid. I would suggest getting a copy of the WPF Toolkit sourcecode and familiarising yourself with the templates for this control:

http://www.codeplex.com/wpf/Release/ProjectReleases.aspx?ReleaseId=15598

You might also find this post on Vincent Sibal&#039;s blog useful:

http://blogs.msdn.com/vinsibal/archive/2008/08/14/wpf-datagrid-dissecting-the-visual-layout.aspx

He basically shows how the various templates that make up the DataGrid are assembled.

I have not tried locating the checkbox in a templated column, so I&#039;m afraid I have not seen the issue you describe. I am a bit busy to try it out myself, however I am sure you would find help on the WPF toolkit codeplex forum:

http://www.codeplex.com/wpf/Thread/List.aspx

Regards, Colin E.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>The DataGrid should already have a button in the top left corner that provides &#8216;select all&#8217; functionality. If you want to change this to a checkbox you will have to change the control template for the DataGrid. I would suggest getting a copy of the WPF Toolkit sourcecode and familiarising yourself with the templates for this control:</p>
<p><a href="http://www.codeplex.com/wpf/Release/ProjectReleases.aspx?ReleaseId=15598" rel="nofollow">http://www.codeplex.com/wpf/Release/ProjectReleases.aspx?ReleaseId=15598</a></p>
<p>You might also find this post on Vincent Sibal&#8217;s blog useful:</p>
<p><a href="http://blogs.msdn.com/vinsibal/archive/2008/08/14/wpf-datagrid-dissecting-the-visual-layout.aspx" rel="nofollow">http://blogs.msdn.com/vinsibal/archive/2008/08/14/wpf-datagrid-dissecting-the-visual-layout.aspx</a></p>
<p>He basically shows how the various templates that make up the DataGrid are assembled.</p>
<p>I have not tried locating the checkbox in a templated column, so I&#8217;m afraid I have not seen the issue you describe. I am a bit busy to try it out myself, however I am sure you would find help on the WPF toolkit codeplex forum:</p>
<p><a href="http://www.codeplex.com/wpf/Thread/List.aspx" rel="nofollow">http://www.codeplex.com/wpf/Thread/List.aspx</a></p>
<p>Regards, Colin E.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Divya</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2008/11/multiselect-datagrid-with-checkboxes/#comment-8</link>
		<dc:creator>Divya</dc:creator>
		<pubDate>Thu, 08 Jan 2009 13:59:44 +0000</pubDate>
		<guid isPermaLink="false">http://wpfadventures.wordpress.com/?p=6#comment-8</guid>
		<description>Hi Colin,

Thanks for your response. I&#039;m sorry I hadn&#039;t explained the expected funtionality.
The requirement is that when the user &quot;checks&quot; / &quot;selects&quot; on the Checkbox (SelectAll) the checkboxes in all rows are are checked &amp; all the rows are highlighted as &quot;Selected&quot; and if the Checkbox (SelectAll) is &quot;unselected&quot; / &quot;unchecked&quot;, the checkboxes in all the rows correspondingly get unchecked &amp; highlighting of all the rows should be undone.
I tried the code snippet from the website given by you, but I&#039;m facing a problem in it. When I select multiple rows using the checkbox (For Ex: 5 continuous rows) and then if I try to uncheck the checkbox, (for ex:- checkbox pertaining to second row), then checkbox remains checked but the selection of the second row remains, instead the other rows will be unselected &amp; so will be the checkboxes!!
Is this behavior appearing because the row selection &quot;IsSelected&quot; property is assigned to the checkbox &quot;IsChecked&quot; property and not vice versa?
I need to highlight the  selected row in the datagrid, when the checkbox is checked and undo the highlighting / selection of the row when the checkbox is unchecked.
Can you please help me around with this?


Also I wanted to know if it is possible to incorporate a checkbox (instead of gray area) for the &quot;Select All&quot; purpose using a row header template itself?</description>
		<content:encoded><![CDATA[<p>Hi Colin,</p>
<p>Thanks for your response. I&#8217;m sorry I hadn&#8217;t explained the expected funtionality.<br />
The requirement is that when the user &#8220;checks&#8221; / &#8220;selects&#8221; on the Checkbox (SelectAll) the checkboxes in all rows are are checked &amp; all the rows are highlighted as &#8220;Selected&#8221; and if the Checkbox (SelectAll) is &#8220;unselected&#8221; / &#8220;unchecked&#8221;, the checkboxes in all the rows correspondingly get unchecked &amp; highlighting of all the rows should be undone.<br />
I tried the code snippet from the website given by you, but I&#8217;m facing a problem in it. When I select multiple rows using the checkbox (For Ex: 5 continuous rows) and then if I try to uncheck the checkbox, (for ex:- checkbox pertaining to second row), then checkbox remains checked but the selection of the second row remains, instead the other rows will be unselected &amp; so will be the checkboxes!!<br />
Is this behavior appearing because the row selection &#8220;IsSelected&#8221; property is assigned to the checkbox &#8220;IsChecked&#8221; property and not vice versa?<br />
I need to highlight the  selected row in the datagrid, when the checkbox is checked and undo the highlighting / selection of the row when the checkbox is unchecked.<br />
Can you please help me around with this?</p>
<p>Also I wanted to know if it is possible to incorporate a checkbox (instead of gray area) for the &#8220;Select All&#8221; purpose using a row header template itself?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

