Ok! This works! Instead of using a DataTemplate that had a stackpanel, textblock and a button, I am doing this now in the code behind. I do need to now set the Header row height probrammatically as well. How can I do that?

here is my code snippet:

#region Add a Column for the Parent Attribute

DataGridTextColumn newColumn1 = new DataGridTextColumn();

Binding binding1 = new Binding("Country");

binding1.Mode = System.Windows.Data.BindingMode.TwoWay;

newColumn1.Binding = binding1;

#region Add a button here to the header

//create a simple stack panel to hold a text box as well as a button an not use a XAML dataTemplate

Going back to your original question, the reason that it wasn't working is because LoadContent will always load a copy of the element you're trying to load, instead of the actual instance which is instantiated in the tree. So you were making your changes
to a copy of that button, instead of the actual button. The way that we would recommend to do this is:

1. It sounds like you need two different data templates for your column headers - one which has this button, and one which doesn't. You should create the two data templates and then use DataGridColumn.HeaderTemplateSelector to choose when to apply
the template with the button. This will make things static rather than dynamic, which will simplify the situation.

2. If you want to attach an event for Button.Click within that data template, you have a couple options:

a) Walk the visual tree to find the instantiated instance of the button and set it directly on that button, OR

b) Use a Style to set the handler for the Click event.

This will allow you to avoid the problem with the header resizing that you've run into. We discussed the header resizing issue and haven't been able to come up with a good solution yet, but I will let you know if we think of anything.