views:

108

answers:

1

Hi,

I have a gridview ...with multiple columns. If I click on one column, it sorts the gridview based on that column values. I like to add an arrow in that "clicked" column header(when user clicks) to show that "this particular column is clicked and this is the sort direction"

How can I do this?

I saw a sample link http://stackoverflow.com/questions/254129/how-to-i-display-a-sort-arrow-in-the-header-of-a-list-view-column-using-c

but its uses Windows.Forms.ListView..but i am using Windows.Controls.Listview :(

A: 

I used this tutorial to solve the same problem you have: http://www.switchonthecode.com/tutorials/wpf-tutorial-using-the-listview-part-2-sorting

It contains a solution by using a custom Adorner, which is added to the ListView-Header.

Torsten
Is adorner only in frame work 4.0 ?
Anish
It's been supported since .NET 3.0; see http://msdn.microsoft.com/de-de/library/system.windows.documents.adorner.aspx
Torsten