开发者

DataGridTemplateColumn doesn't support direct content?

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜