|
I have a requirement where I am using a datagrid and the number of columns will not be known until runtime. I found the following article and was able to get it working.
http://elegantcode.com/2010/03/08/silverlight-datagrid-populate-dynamic-columns-from-a-child-collection/
However this solution uses the XamlReader and creates a datatemplate in the code behind. I am not entirely happy with this solution. Is there another way that I can achieve the same result without using the XamlReader. Essentially im trying to achieve something like this
CellTemp.Append(String.Format("<TextBlock Text='{{Binding Periods[{0}].{1}}}'/>", index, propertyName)); but instead of using the XamlReader create this binding in in xaml.
modified 17-Dec-12 0:34am.
|
|
|
|