<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.silverlight.net/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>Silverlight Controls and Silverlight Toolkit</title><link>http://forums.silverlight.net/forums/35.aspx</link><description>Discussions around using and developing Silverlight controls and the Silverlight Toolkit</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>Re: Re: Re: Re: Re: determine datagrid row</title><link>http://forums.silverlight.net/forums/thread/242885.aspx</link><pubDate>Mon, 06 Jul 2009 02:20:40 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:242885</guid><dc:creator>slen</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/242885.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=35&amp;PostID=242885</wfw:commentRss><description>&lt;p&gt;this surely works well.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Maybe I want to know more or just I find it having a checkbox in the grid is what I really want.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Do you have any idea to work around that?&amp;nbsp; &lt;/p&gt;&lt;p&gt;Having the previous example given above, &lt;span style="font-weight:bold;"&gt;how do you add another column in the itemsource&lt;/span&gt; to determine whether any of the&amp;nbsp; checkboxes is checked?&lt;/p&gt;&lt;p&gt;Thanks&amp;nbsp; &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Re: Re: Re: determine datagrid row</title><link>http://forums.silverlight.net/forums/thread/241357.aspx</link><pubDate>Fri, 03 Jul 2009 05:03:06 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:241357</guid><dc:creator>TomBeeby</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/241357.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=35&amp;PostID=241357</wfw:commentRss><description>&lt;p&gt;DataGrid supports selection out of the box. Make sure SelectionMode=&amp;quot;Extended&amp;quot;, then you can click on a row to select, or use CTRL and SHIFT to select multiple rows.&lt;/p&gt;&lt;p&gt;In your codebehind you can access the SelectedItems &lt;/p&gt;&lt;p&gt;so, if you want to delete items from a collection that is bound to a DataGrid, put a button on the page and in the Click handler, delete all the items in yourdatagrid.SelectedItems &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Re: Re: Re: determine datagrid row</title><link>http://forums.silverlight.net/forums/thread/241287.aspx</link><pubDate>Fri, 03 Jul 2009 03:32:32 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:241287</guid><dc:creator>slen</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/241287.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=35&amp;PostID=241287</wfw:commentRss><description>&lt;p&gt;Thanks for the link Tom. Sure I will bookmark the link. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;I have never really done anything with Linq before I started to use silverlight last friday&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Is there another way to loop through the datagrid&amp;#39;s collection?&lt;/p&gt;&lt;p&gt;Now, in my xaml file is like the following:&lt;/p&gt;&lt;p style="font-style:italic;"&gt;&amp;nbsp;&amp;lt;my:DataGridTemplateColumn&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;my:DataGridTemplateColumn.CellTemplate&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DataTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;CheckBox x:Name=&amp;quot;rowckbx&amp;quot; Tag=&amp;quot;{Binding id}&amp;quot;&amp;nbsp; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/DataTemplate&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/my:DataGridTemplateColumn.CellTemplate&amp;gt; &lt;br /&gt;&amp;nbsp; &amp;lt;/my:DataGridTemplateColumn&amp;gt;&lt;/p&gt;&lt;p style="font-style:italic;"&gt;&amp;nbsp; the &lt;span style="font-weight:bold;"&gt;id &lt;/span&gt;that I am binding to is actually in integer form, starting from 1 and onward. Innitially, I was thinking to loop throught the datagrid, row by row, to check whether the checkbox &lt;span style="font-weight:bold;"&gt;rowckbx&lt;/span&gt; is checked.Now, I am kind of confused.&lt;br /&gt;&lt;/p&gt;&lt;p style="font-style:italic;"&gt;Any good/easy approach to do this? Loop through -&amp;gt; check is checked -&amp;gt; get the binded &lt;span style="font-weight:bold;"&gt;id&lt;/span&gt; -&amp;gt; delete data from the list&lt;/p&gt;&lt;p style="font-style:italic;"&gt;Thanks &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Re: Re: determine datagrid row</title><link>http://forums.silverlight.net/forums/thread/241268.aspx</link><pubDate>Fri, 03 Jul 2009 03:04:45 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:241268</guid><dc:creator>TomBeeby</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/241268.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=35&amp;PostID=241268</wfw:commentRss><description>&lt;p&gt;sounds like you need to brush up on linq&lt;/p&gt;&lt;p&gt;http://msdn.microsoft.com/en-gb/library/bb308959.aspx&lt;/p&gt;&lt;p&gt;Linq is &amp;#39;a general purpose query facility&amp;#39; for the .net framework&lt;/p&gt;&lt;p&gt;i can&amp;#39;t help you with VB syntax i&amp;#39;m afraid, though i imagine the link above will help &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Re: Re: determine datagrid row</title><link>http://forums.silverlight.net/forums/thread/241243.aspx</link><pubDate>Fri, 03 Jul 2009 02:33:32 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:241243</guid><dc:creator>slen</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/241243.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=35&amp;PostID=241243</wfw:commentRss><description>&lt;p&gt;Can I know what the &lt;b&gt;i &lt;/b&gt;is represented ? &lt;/p&gt;&lt;p&gt;I am not using the DataGridCheckBoxColum. I am using the template. &lt;/p&gt;&lt;p&gt;If I use the DataGridCheckBox, all the checkbox will be checked.&lt;/p&gt;&lt;p&gt;I am not familiar with C#. &lt;/p&gt;&lt;p&gt;May I know what the =&amp;gt; pointer points to? How do I do it in VB?&lt;/p&gt;&lt;p&gt;Thanks &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Re: determine datagrid row</title><link>http://forums.silverlight.net/forums/thread/241167.aspx</link><pubDate>Fri, 03 Jul 2009 00:51:57 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:241167</guid><dc:creator>TomBeeby</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/241167.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=35&amp;PostID=241167</wfw:commentRss><description>&lt;p&gt;think of &amp;#39;looping through the collection bound to the datagrid&amp;#39; not &amp;#39;looping through the datagrid&amp;#39;&lt;/p&gt;&lt;p&gt;so,&lt;/p&gt;&lt;p&gt;if you have a collection&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;IEnumerable&amp;lt;&lt;span class="tag"&gt;Project&lt;/span&gt;&amp;gt; Projects;&lt;/pre&gt;&amp;nbsp;&amp;nbsp;&lt;p&gt;and the Project class has a bool property called IsActive that is bound to a  DataGridCheckBoxColumn, like:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;&amp;lt;&lt;span class="tag"&gt;data:DataGrid&lt;/span&gt;&lt;span class="attr"&gt; ItemsSource=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;{Binding Products}&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;    &amp;lt;&lt;span class="tag"&gt;data:DataGrid.Columns&lt;/span&gt;&amp;gt;&lt;br /&gt;        &amp;lt;&lt;span class="tag"&gt;data:DataGridCheckBoxColumn&lt;/span&gt;&lt;span class="attr"&gt; Binding=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;{Binding IsActive}&amp;quot;&lt;/span&gt; /&amp;gt;&lt;br /&gt;    &amp;lt;/&lt;span class="tag"&gt;data:DataGrid.Columns&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span class="tag"&gt;data:DataGrid&lt;/span&gt;&amp;gt;&lt;/pre&gt;&amp;nbsp;&amp;nbsp;&lt;p&gt;then you can run some linq on the collection, like so:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;var res = Projects.Where(i =&amp;gt; i.IsActive).ToList();&lt;/pre&gt;&amp;nbsp;&amp;nbsp;&lt;p&gt;if you wanted, say, to get a list of all the active projects &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Re: determine datagrid row</title><link>http://forums.silverlight.net/forums/thread/240659.aspx</link><pubDate>Thu, 02 Jul 2009 08:28:41 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:240659</guid><dc:creator>slen</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/240659.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=35&amp;PostID=240659</wfw:commentRss><description>&lt;p&gt;What is the attribute that I can use to loop through datagrid? I want to detect the checkbox in datagrid. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: determine datagrid row</title><link>http://forums.silverlight.net/forums/thread/240067.aspx</link><pubDate>Wed, 01 Jul 2009 06:02:21 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:240067</guid><dc:creator>TomBeeby</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/240067.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=35&amp;PostID=240067</wfw:commentRss><description>&lt;p&gt;&amp;gt;&amp;gt; Is there any way to know the number of row in the datagrid?&lt;/p&gt;&lt;p&gt;The ItemsSource of a DataGrid is a collection.. try counting the number of items in the collection using Count:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;((IList)datagrid1.ItemsSource).Count&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;or if the ItemsSource is of type IEnumerable you could use Linq&amp;#39;s Count() method&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;gt;&amp;gt; Can a datagrid in silverlight to have the number of page function?&lt;/p&gt;&lt;p&gt;Yes! Have a look at a DataPager control&lt;/p&gt;&lt;p&gt;http://silverlight.codeplex.com/Wiki/View.aspx?title=Silverlight%20Toolkit%20Overview%20Part%205 &lt;br /&gt;&lt;/p&gt;</description></item><item><title>determine datagrid row</title><link>http://forums.silverlight.net/forums/thread/239993.aspx</link><pubDate>Wed, 01 Jul 2009 01:25:38 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:239993</guid><dc:creator>slen</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/239993.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=35&amp;PostID=239993</wfw:commentRss><description>&lt;p&gt;Is there any way to know the number of row in the datagrid? Can a datagrid in silverlight to have the number of page function? Or there should have another object to do these functions?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>