<?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: Silverlight DataGrid &#8211; Populate Dynamic Columns from a Child Collection</title>
	<atom:link href="http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/</link>
	<description></description>
	<lastBuildDate>Fri, 16 Jul 2010 17:01:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Brian Lagunas</title>
		<link>http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/comment-page-1/#comment-78</link>
		<dc:creator>Brian Lagunas</dc:creator>
		<pubDate>Fri, 16 Jul 2010 17:01:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/#comment-78</guid>
		<description>Check out this thread, it may help you with your problem.

http://forums.silverlight.net/forums/p/93093/295874.aspx</description>
		<content:encoded><![CDATA[<p>Check out this thread, it may help you with your problem.</p>
<p><a href="http://forums.silverlight.net/forums/p/93093/295874.aspx" rel="nofollow">http://forums.silverlight.net/forums/p/93093/295874.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ari Weinberger</title>
		<link>http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/comment-page-1/#comment-77</link>
		<dc:creator>Ari Weinberger</dc:creator>
		<pubDate>Fri, 16 Jul 2010 15:34:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/#comment-77</guid>
		<description>I hit another brick wall. I need the grid to be editable.
If I use a value converter, I don&#039;t have a reference to the original EntityCollection on ConvertBack.
:(</description>
		<content:encoded><![CDATA[<p>I hit another brick wall. I need the grid to be editable.<br />
If I use a value converter, I don&#8217;t have a reference to the original EntityCollection on ConvertBack.<br />
 <img src='http://www.brianlagunas.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ari Weinberger</title>
		<link>http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/comment-page-1/#comment-76</link>
		<dc:creator>Ari Weinberger</dc:creator>
		<pubDate>Thu, 15 Jul 2010 17:17:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/#comment-76</guid>
		<description>Thanks for the value converter suggestion. It works great!

Thanks again for your help!</description>
		<content:encoded><![CDATA[<p>Thanks for the value converter suggestion. It works great!</p>
<p>Thanks again for your help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Lagunas</title>
		<link>http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/comment-page-1/#comment-75</link>
		<dc:creator>Brian Lagunas</dc:creator>
		<pubDate>Thu, 15 Jul 2010 16:34:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/#comment-75</guid>
		<description>Without having your code available it is difficult to help.  You could try binding to the object and then using a value converter to get the desired result.

Happy coding.</description>
		<content:encoded><![CDATA[<p>Without having your code available it is difficult to help.  You could try binding to the object and then using a value converter to get the desired result.</p>
<p>Happy coding.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ari Weinberger</title>
		<link>http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/comment-page-1/#comment-74</link>
		<dc:creator>Ari Weinberger</dc:creator>
		<pubDate>Thu, 15 Jul 2010 15:56:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/#comment-74</guid>
		<description>Thanks for your reply. I tried the following, but it&#039;s not valid syntax.
I tried both [] and () for the index. () throws an error, while [] doesn&#039;t work.
What am I doing wrong?

Thanks again.


dg.Columns.Add(New DataGridTextColumn With {
        .Binding= New Binding(&quot;Periods.ElementAt[0].Hours&quot;)})</description>
		<content:encoded><![CDATA[<p>Thanks for your reply. I tried the following, but it&#8217;s not valid syntax.<br />
I tried both [] and () for the index. () throws an error, while [] doesn&#8217;t work.<br />
What am I doing wrong?</p>
<p>Thanks again.</p>
<p>dg.Columns.Add(New DataGridTextColumn With {<br />
        .Binding= New Binding(&#8220;Periods.ElementAt[0].Hours&#8221;)})</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Lagunas</title>
		<link>http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/comment-page-1/#comment-73</link>
		<dc:creator>Brian Lagunas</dc:creator>
		<pubDate>Thu, 15 Jul 2010 15:10:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/#comment-73</guid>
		<description>That is because you cannot apply [] indexing to an EntityCollection. You could try using ElementAt(index).</description>
		<content:encoded><![CDATA[<p>That is because you cannot apply [] indexing to an EntityCollection. You could try using ElementAt(index).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ari Weinberger</title>
		<link>http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/comment-page-1/#comment-71</link>
		<dc:creator>Ari Weinberger</dc:creator>
		<pubDate>Thu, 15 Jul 2010 05:37:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/#comment-71</guid>
		<description>Hi, I tried to implement this with WCF RIA Services that returns an entity with an EntityCollection as one of its properties (the entity is associated with another in a one to many relationship).
The indexer doesn&#039;t seem to work in this case.
If I bind to the .Count, I get the number of items in the collection, so the data is there.

Any suggestions?</description>
		<content:encoded><![CDATA[<p>Hi, I tried to implement this with WCF RIA Services that returns an entity with an EntityCollection as one of its properties (the entity is associated with another in a one to many relationship).<br />
The indexer doesn&#8217;t seem to work in this case.<br />
If I bind to the .Count, I get the number of items in the collection, so the data is there.</p>
<p>Any suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Lagunas</title>
		<link>http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/comment-page-1/#comment-48</link>
		<dc:creator>Brian Lagunas</dc:creator>
		<pubDate>Wed, 14 Apr 2010 13:40:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/#comment-48</guid>
		<description>You could try using a ValueConverter on your edit data template.  This will allow you to conditionally set the IsReadOnly property on your TextBox.</description>
		<content:encoded><![CDATA[<p>You could try using a ValueConverter on your edit data template.  This will allow you to conditionally set the IsReadOnly property on your TextBox.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pablo</title>
		<link>http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/comment-page-1/#comment-47</link>
		<dc:creator>Pablo</dc:creator>
		<pubDate>Wed, 14 Apr 2010 10:08:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/#comment-47</guid>
		<description>Ok, this codes are corrects but after do this, i need disable or not disable one cell if my data is not null or is null, 

¿Is this posible?

I played with is read only and IsEnabled of Texbox of datatemplate, and not work, because IsReadOnly disabled all cells of column and textbox is datatemplate for all cell columns do same thing...

:(

You have one idea?

Thanks,

Pablo</description>
		<content:encoded><![CDATA[<p>Ok, this codes are corrects but after do this, i need disable or not disable one cell if my data is not null or is null, </p>
<p>¿Is this posible?</p>
<p>I played with is read only and IsEnabled of Texbox of datatemplate, and not work, because IsReadOnly disabled all cells of column and textbox is datatemplate for all cell columns do same thing&#8230;</p>
<p> <img src='http://www.brianlagunas.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>You have one idea?</p>
<p>Thanks,</p>
<p>Pablo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Lagunas</title>
		<link>http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/comment-page-1/#comment-27</link>
		<dc:creator>Brian Lagunas</dc:creator>
		<pubDate>Tue, 09 Mar 2010 23:44:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.brianlagunas.com/index.php/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/#comment-27</guid>
		<description>You are correct, I could accomplish the same thing by writing this:

dataGrid.Columns.Add(new DataGridTextColumn()
                    {
                        IsReadOnly = false,
                        Binding = new System.Windows.Data.Binding(string.Format(&quot;Periods[{0}].Hours&quot;, i)) { Mode = System.Windows.Data.BindingMode.TwoWay }
                    });

But, this works only only for the DataGrid. If I used any other grid such as the Infragistics XamWebGrid or the DevExpress AgDataGrid, that method would not work.  So I wrote this blog post with that in mind, and suggested a method that can work with any grid.</description>
		<content:encoded><![CDATA[<p>You are correct, I could accomplish the same thing by writing this:</p>
<p>dataGrid.Columns.Add(new DataGridTextColumn()<br />
                    {<br />
                        IsReadOnly = false,<br />
                        Binding = new System.Windows.Data.Binding(string.Format(&#8220;Periods[{0}].Hours&#8221;, i)) { Mode = System.Windows.Data.BindingMode.TwoWay }<br />
                    });</p>
<p>But, this works only only for the DataGrid. If I used any other grid such as the Infragistics XamWebGrid or the DevExpress AgDataGrid, that method would not work.  So I wrote this blog post with that in mind, and suggested a method that can work with any grid.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
