views:

11

answers:

1

I know I did this in Silverlight...

In WPF 4 I am trying to put controls in a DataGridTemplateColumn element in DataGrid XAML

I can't add anything to it and I get errors saying it doesn't support direct content. WTF?

I want to put in maybe a hyperlink, textboxes, a button, etc. I can't even add a canvas.

A: 

DataGridTemplateColumn uses Templates, as in DataTemplate, to define the content that should be created for the view and edit modes. You can put any content you want in a DataTemplate assigned to the CellTemplate (and optionally CellEditingTemplate). The template allows each individual row to create its own instances of the elements in the template.

John Bowen