Datagrid ControlTemplate

Mar 31, 2009 at 10:33 PM
Can anybody direct me to a sample ControlTemplate for the DataGrid? Specifically the DataGrid, not the cells and rows. Through trial and error I have an ugly grid that doesn't scroll and whose header columns are misaligned with the columns in the rows. More importantly, is there a better way (than trial and error) to customize the controltemplate? For example, could I somehow discover the default control template and just tweak it for my needs? I feel like I'm wasting too much time even for a novice.
Apr 1, 2009 at 1:07 AM
Have you looked at the actual DataGrid.ControlTemplate?  Maybe that can help you understand how to build a custom template.
Apr 1, 2009 at 1:24 AM
It certainly might! How would I go about looking at it?
Apr 1, 2009 at 3:07 AM
You can download the source code under the Releases tab.  Once downloaded, take a look at the Generic.xaml file for DataGrid.
Apr 1, 2009 at 1:29 PM
Thank you very much.
Sep 25, 2009 at 2:02 PM

That was helpful. 10x