I am using C# in Visual Studio 2008 and I have install the WPF Toolkit. I created a DataGrid in testtest.xaml. The ID and Parts $ columns have the ability to sort the DataGrid by clicking on their respecteive column headers. However, the column header Complete Date does not have that ability. I used the tag "DataGridTemplateColumn" to format the dates for this column. How do you program the column header Complete Date so you can click on the Complete Date column header and sort that column. If you click on the column, the arrow is not only not displayed but the column header is not "clickable". Thank you
<Label Height="22" HorizontalAlignment="Left" Margin="10,45,0,0" Name="label1" VerticalAlignment="Top" Width="41">Task</Label>
<my:DataGrid ItemsSource="{Binding}" AutoGenerateColumns="False" Margin="140,83,67,28" Name="dataGrid1" GridLinesVisibility="Vertical" IsReadOnly="True">
<my:DataGrid.Columns>
<my:DataGridTextColumn Binding="{Binding Path=[ID]}" Header="ID" />
<my:DataGridTextColumn Binding="{Binding Path=p}" Header="Parts $" />
<my:DataGridTemplateColumn SortMemberPath="" Header="Complete Date">
<my:DataGridTemplateColumn.CellTemplate >
<DataTemplate>
<TextBlock>
<TextBlock.Text>
<Binding Path="CompleteDate" ConverterCulture="en-GB" StringFormat="{}{0:MM/dd/yyyy}"/>
</TextBlock.Text>
</TextBlock>
</DataTemplate>
</my:DataGridTemplateColumn.CellTemplate>
</my:DataGridTemplateColumn>
</my:DataGrid.Columns>
</my:DataGrid>
</Grid>