SilverlightShow: Defining Silverlight DataGrid Columns at Runtime Comments Silverlight articles, Silverlight tutorials, Silverlight videos, Silverlight samples en-us (Emil Stoychev) Argotic Syndication Framework, Runtime data provider <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) Sun, 01 Feb 2009 14:05:10 -0400 RE: Defining Silverlight DataGrid Columns at Runtime <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) Thu, 29 Jan 2009 08:48:04 -0400 RE: Defining Silverlight DataGrid Columns at Runtime <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="">How to format a binding value using converters?</a> and <a href="">How to pass a parameter to a value converter?</a> ;)</p> ( Enrai) Tue, 27 Jan 2009 06:59:58 -0400 RE: Defining Silverlight DataGrid Columns at Runtime <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) Tue, 27 Jan 2009 04:43:48 -0400 RE: Defining Silverlight DataGrid Columns at Runtime <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) Wed, 24 Dec 2008 14:54:14 -0400 RE: Defining Silverlight DataGrid Columns at Runtime <p>Excelent...</p> ( Muhammad Saifullah.) Tue, 18 Nov 2008 08:41:25 -0400