SilverlightShow: Defining Columns for a Silverlight DataGrid Comments http://www.silverlightshow.net/ Silverlight articles, Silverlight tutorials, Silverlight videos, Silverlight samples SilverlightShow.net http://www.rssboard.org/rss-specification Argotic Syndication Framework 2008.0.2.0, http://www.codeplex.com/Argotic en-US estoychev@completit.com (Emil Stoychev) RE: Defining Columns for a Silverlight DataGrid Any idea on how to configure sorting on a grid column with a template column?/ http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx#comment6206 bruce http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx Thu, 26 May 2011 11:48:53 GMT Problem with Silverlight Grid <p>I am a issue with the silverlight grid. Grid in below code is containing of checkboxes. I check some item in the first and second row of checkboxes. When I scroll down the remaining checkbox in the grid the checkbox's on the top of the grid gets unchecked. Please let us know if any resolution to this.</p> <data:DataGrid x:Name="dtGrdCategory" HorizontalAlignment="Left" HeadersVisibility="None"<br /> <p></p> <p>                       RowBackground="#1C1785E5" AlternatingRowBackground="Transparent" Background="Transparent"<br />                        Margin="171,230,0,44" RowHeight="29" HorizontalScrollBarVisibility="Disabled" <br />                        VerticalScrollBarVisibility="Auto" Width="556" AutoGenerateColumns="False" <br />                        GridLinesVisibility="None"><br />             <data:DataGrid.Columns><br />                 <data:DataGridTemplateColumn Width="278"><br />                     <data:DataGridTemplateColumn.CellTemplate><br />                         <DataTemplate><br />                             <CheckBox Tag="{Binding CategoryID}" Content="{Binding CategoryName}" Foreground="#ffffff" <br />                                       Margin="20,7,0,0"  Click="CheckBox_Checked"></CheckBox><br />                         </DataTemplate><br />                     </data:DataGridTemplateColumn.CellTemplate><br />                 </data:DataGridTemplateColumn><br />                 <data:DataGridTemplateColumn Width="278"><br />                     <data:DataGridTemplateColumn.CellTemplate><br />                         <DataTemplate><br />                             <CheckBox Tag="{Binding CategoryID2}" Content="{Binding CategoryName2}" <br />                                       Visibility="{Binding visibility2}"  Foreground="#ffffff" Margin="20,7,0,0"  <br />                                       Click="CheckBox_Checked"></CheckBox><br />                         </DataTemplate><br />                     </data:DataGridTemplateColumn.CellTemplate><br />                 </data:DataGridTemplateColumn><br />             </data:DataGrid.Columns><br />         </data:DataGrid></p> <p></p> Thanks in Advance <p></p> http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx#comment5505 Prashant Jain http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx Tue, 15 Feb 2011 13:41:06 GMT RE: Defining Columns for a Silverlight DataGrid <p>Hi <em>Estevez,</em></p> <p>you should use <strong>DataGridTextColumn</strong> and <strong>Binding</strong> instead of <strong>DataGridTextBoxColumn</strong> and <strong>DisplayMemberBinding</strong> respectively. These are changes made after Silverlight 2.</p> http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx#comment5140 lnikolov http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx Wed, 22 Dec 2010 14:51:26 GMT RE: Defining Columns for a Silverlight DataGrid <span style="color: #535353; font-family: arial, verdana, tahoma, sans-serif; font-size: 14px; line-height: 20px;"> <pre class="code"><span style="color: red;">there is not such property: DisplayMemberBinding</span></pre> <pre class="code"><span style="color: red;">and I have DataGridTextColumn and not DataGridText BOX Column.</span></pre> <pre class="code"><span style="color: red;"><br /></span></pre> <pre class="code"><span style="color: red;">Whats wrong?</span></pre> </span> http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx#comment4923 Estevez http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx Fri, 19 Nov 2010 17:10:48 GMT RE: Defining Columns for a Silverlight DataGrid Thank you very much for the date format example. Really saved me a lot of time finding this page. http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx#comment4512 jwhitten http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx Sun, 19 Sep 2010 06:13:36 GMT RE: Defining Columns for a Silverlight DataGrid How to edit a datagrid row using an edit button in cell template. When I click edit button it should execute my CellEditingTemplate. How can i achieve this ? http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx#comment3725 Sam http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx Fri, 04 Jun 2010 09:53:43 GMT RE: Defining Columns for a Silverlight DataGrid every well explained http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx#comment3530 myle http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx Mon, 03 May 2010 20:41:19 GMT RE: Defining Columns for a Silverlight DataGrid If I use a <span style="font-size: 10px; color: #a31515;">DataGridTemplateColumn and in <span style="font-size: 10px; color: #a31515;">CellEditingTemplate make it a combo box. If I want to have a different itemSource for this combo box (different than the ItemSource for the DataGrid. For example from a web service call. How do I do that? </span></span><span style="font-size: 10px; color: #0000ff;"> <p> </p> </span> http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx#comment2376 Silver http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx Fri, 18 Sep 2009 22:24:49 GMT how to add an image to datagrid plz i want to how to add an image to datagrid http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx#comment1406 sakthi http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx Thu, 02 Apr 2009 07:19:25 GMT RE: Defining Columns for a Silverlight DataGrid <p>Frozen Columns in Silverlight DataGrid..</p> <p>http://dotnetdreamer.wordpress.com/2009/01/31/silverlight-2-datagrid-frozen-columns/</p> http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx#comment990 Ramprasad http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx Sat, 31 Jan 2009 08:09:00 GMT RE: Defining Columns for a Silverlight DataGrid <p>Good one.</p> http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx#comment984 Abdus Salam http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx Thu, 29 Jan 2009 08:15:00 GMT RE: Defining Columns for a Silverlight DataGrid <p>how do i add an image column to Data Grid...?</p> http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx#comment977 Zain Shaikh http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx Wed, 28 Jan 2009 05:22:18 GMT RE: Defining Columns for a Silverlight DataGrid yes,good one example http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx#comment894 lc http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx Mon, 12 Jan 2009 03:14:09 GMT RE: Defining Columns for a Silverlight DataGrid <p>Great article. I am looking for the solution to handle a button click inside a datagridtemplate column. I need to figure out what row was clicked? Any ideas?  Thanks in advance.</p> http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx#comment617 Jennifer Meyer http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx Wed, 05 Nov 2008 09:13:20 GMT RE: Defining Columns for a Silverlight DataGrid <p>Really good one example</p> http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx#comment530 Mahendra http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx Thu, 09 Oct 2008 23:19:46 GMT RE: Defining Columns for a Silverlight DataGrid good one http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx#comment132 mice http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx Fri, 16 May 2008 00:48:34 GMT RE: Defining Columns for a Silverlight DataGrid Very good example. Thanks for your time http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx#comment103 Shaun O'Reilly http://www.silverlightshow.net/items/Defining-Columns-for-a-Silverlight-DataGrid.aspx Mon, 21 Apr 2008 21:49:43 GMT