SilverlightShow: Defining Silverlight DataGrid Columns at Runtime Comments http://www.silverlightshow.net/ Silverlight articles, Silverlight tutorials, Silverlight videos, Silverlight samples en-us SilverlightShow.net estoychev@completit.com (Emil Stoychev) Argotic Syndication Framework, http://www.codeplex.com/Argotic http://www.rssboard.org/rss-specification Runtime data provider http://www.silverlightshow.net/items/Defining-Silverlight-DataGrid-Columns-at-Runtime.aspx#comment998 <p> Hey! I'm new to Silverlight. I come from a JAVA background with a small detour to Flex. While developing Flex, I got used to adding random properties to Object instances any time I wanted. That helped a lot when I wanted to render a two dimensional data grid with column names unknown until web service result arrived.</p> <p>I'm asking the same thing as MSW: how can I define a two dimensional array as source of data and give the coloumn names at runtime?</p> <p>Thanks, Jeti</p> <p> </p> ( Jeti) http://www.silverlightshow.net/items/Defining-Silverlight-DataGrid-Columns-at-Runtime.aspx Sun, 01 Feb 2009 14:05:10 -0400 RE: Defining Silverlight DataGrid Columns at Runtime http://www.silverlightshow.net/items/Defining-Silverlight-DataGrid-Columns-at-Runtime.aspx#comment985 <p>Hi,</p> <p>It realy helped to add template column dynamically in the datagrid. But when we try to attach keydown event to the textbox when using xaml Reader metho?</p> ( Muhammad Saifullah) http://www.silverlightshow.net/items/Defining-Silverlight-DataGrid-Columns-at-Runtime.aspx Thu, 29 Jan 2009 08:48:04 -0400 RE: Defining Silverlight DataGrid Columns at Runtime http://www.silverlightshow.net/items/Defining-Silverlight-DataGrid-Columns-at-Runtime.aspx#comment965 <p>Hi, bobdupuy,<br /> <br /> in these two tips you can find some useful information regarding the usage of custom value converters in Silverlight - <a href="http://www.silverlightshow.net/tips/How-to-format-a-binding-value-using-convertors.aspx">How to format a binding value using converters?</a> and <a href="http://www.silverlightshow.net/tips/Tip-How-to-pass-a-parameter-to-a-value-converter.aspx">How to pass a parameter to a value converter?</a> ;)</p> ( Enrai) http://www.silverlightshow.net/items/Defining-Silverlight-DataGrid-Columns-at-Runtime.aspx Tue, 27 Jan 2009 06:59:58 -0400 RE: Defining Silverlight DataGrid Columns at Runtime http://www.silverlightshow.net/items/Defining-Silverlight-DataGrid-Columns-at-Runtime.aspx#comment963 <p>Hi,</p> <p>I'm interested in the second approach using XamlReader.Load.</p> <p>Unfortunately, the c# (and VB) code provided doesn't compile. There are extra " characters in the string literals. Futhermore, looking at the XAML generated by the string builder, it looks incomplete: There's no data template, no graphic object, just namespaces and properties...Is it expected ?</p> <p>I'm trying to figure out how to use custom converters with XamlReader.Load: How to declare the converter in XAML ?</p> <p>Thanks</p> <p>Robert.</p> ( bobdupuy) http://www.silverlightshow.net/items/Defining-Silverlight-DataGrid-Columns-at-Runtime.aspx Tue, 27 Jan 2009 04:43:48 -0400 RE: Defining Silverlight DataGrid Columns at Runtime http://www.silverlightshow.net/items/Defining-Silverlight-DataGrid-Columns-at-Runtime.aspx#comment868 <p>Scott - this works assuming that the field names for binding (i.e. Birthday) are pre-defined at design time.  The trickier case is where your fields are not known until run-time.  As an example, a grid where the rows are various products and the columns are categories defined and populated by the user at run-time.  How can we solve that requirement, since the binding cannot be defined at design time?</p> ( MSW) http://www.silverlightshow.net/items/Defining-Silverlight-DataGrid-Columns-at-Runtime.aspx Wed, 24 Dec 2008 14:54:14 -0400 RE: Defining Silverlight DataGrid Columns at Runtime http://www.silverlightshow.net/items/Defining-Silverlight-DataGrid-Columns-at-Runtime.aspx#comment702 <p>Excelent...</p> ( Muhammad Saifullah.) http://www.silverlightshow.net/items/Defining-Silverlight-DataGrid-Columns-at-Runtime.aspx Tue, 18 Nov 2008 08:41:25 -0400