Is there a way to add tool tip to DataGridColumn header and still retain the sorting functionality. The below code doesnt work(It doesnt display the tooltip)
<toolkit:DataGridTextColumn Header="Test" Width="70" Binding="{Binding TestText}" ToolTipService.ToolTip="{Binding TestText}">
And when I use the code below
<toolkit:DataGridTemplateColumn Header="Test" Width="70">
<toolkit:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding TestText}" ToolTip="{Binding TestText}" />
</DataTemplate>
</toolkit:DataGridTemplateColumn.CellTemplate>
</toolkit:DataGridTemplateColumn>
The column loses sorting functionality..Help!
When the grid creates automatic columns, it knows which field is being displayed in that column. When you create the column yourself, the data grid doesn't know what data you'll be displaying in that column and so it cannot guess which field to sort the column by. To make a column you define yourself sortable, add the
SortMemberPath
property to yourDataGridTemplateColumn
like this: