In Silverlight 2 you cannot create DataTemplate in code. The only way is to define it in XAML as a resource. Then you can get a reference in code and set it to the HeaderTemplate
Let me know if you need more help.
the Telerik team
Check out Telerik Trainer
, the state of the art learning tool for Telerik products.