Question

My application uses the DataGrid of the WPF Toolkit. Standard column headers are clickable (when I move over them with the mouse, also some effect appears), but the headers of template columns don't have this behaviour. The sorting event is not fired when I'm clicking on the header and there is also no visual effect.

<Controls:DataGrid Sorting="DataGrid_Sorting">
    <Controls:DataGrid.Columns>
        <Controls:DataGridTextColumn Header="Hello" />
        <Controls:DataGridTemplateColumn Header="World">
            <Controls:DataGridTemplateColumn.CellTemplate>
                <DataTemplate>
                    <Button Content="Test" />
                </DataTemplate>
            </Controls:DataGridTemplateColumn.CellTemplate>
        </Controls:DataGridTemplateColumn>
    </Controls:DataGrid.Columns>
</Controls:DataGrid>

How can I achieve sorting (or what information do I need to provide the DataGrid with)?

Best Regards, Oliver Hanappi

Was it helpful?

Solution

I have found the solution on CodePlex: http://wpf.codeplex.com/Thread/View.aspx?ThreadId=63961

Best Regards
Oliver Hanappi

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top