Hi,
Could you provide me sample code (not xaml) that would display an image and text in the column header using HeaderTemplate property?
As the columns are autogenerated, the customized in code behind.
Thanks
Babu
Hi Babu,
You really have 2 options.
1. Define the DataTemplates in a ResourceDictionary in your xaml, and retrieve it in the code behind.
2. Dynamically create your DataTemplates as strings, and use the XamlReader. The following article explains how you can achieve this:
http://blogs.msdn.com/scmorris/archive/2008/04/14/defining-silverlight-datagrid-columns-at-runtime.aspx
-SteveZ
Hi Steve,
Thanks after a bit of tweaking arund. I wish MS provided a class instantiation for DataTemplate.
Regards